Ad Widget

Collapse

Zabbix database upgrade issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ziboux
    Junior Member
    • Apr 2019
    • 13

    #1

    Zabbix database upgrade issue

    Hi there,
    I am facing a problem on my Zabbix server.
    I got it into my head to migrate to version 6.0 from 4.0.2.
    After various manipulations that allowed me to migrate Debian 9 to 10, migrate the MariaDB version to 10.5.18, I performed the Zabbix update procedure.
    Problem I find myself on the Zabbix Installation page where I am asked to create a database.
    I choose the current database with the credentials and end up with a message:

    Unable to connect to database.
    Zabbix database version does not match current requirements.
    Version of your database: 4020000. Required version: 6000000.
    Please contact your system administrator.

    Apparently the base version did not migrate to 6 correctly..
    My question is, can I run this manually?
    How to do, because apparently this is done automatically when you restart systemctl start zabbix-server ..
    Thank you for your help​
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #2
    You shouldn't try to go to GUI before actually starting/restarting the new Zabbix server process and thus upgrading the database.

    See zabbix_server.log for the progress and any problems in the upgrade process.

    Markku

    Comment

    • Ziboux
      Junior Member
      • Apr 2019
      • 13

      #3

      Yes I realized my mistake, I wanted to go too fast after the long hours I spent updating the machine.

      I actually checked the log file and here is its contents:

      Code:
        1541:20221206:085240.262 using configuration file: /etc/zabbix/zabbix_server.conf
         1541:20221206:085240.281 current database version (mandatory/optional): 04030005/04030005
         1541:20221206:085240.281 required mandatory version: 06000000
         1541:20221206:085240.281 optional patches were found
         1541:20221206:085240.281 starting automatic database upgrade
         1541:20221206:085240.286 [Z3005] query failed: [1118] Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs [alter table items drop column lastlogsize]
         1541:20221206:085240.286 database upgrade failed
         1544:20221206:085252.518 Starting Zabbix Server. Zabbix 6.0.12 (revision 126aa2f53e9).
         1544:20221206:085252.518 ****** Enabled features ******
         1544:20221206:085252.518 SNMP monitoring: YES
         1544:20221206:085252.518 IPMI monitoring: YES
         1544:20221206:085252.518 Web monitoring: YES
         1544:20221206:085252.518 VMware monitoring: YES
         1544:20221206:085252.518 SMTP authentication: YES
         1544:20221206:085252.518 ODBC: YES
         1544:20221206:085252.518 SSH support: YES
         1544:20221206:085252.518 IPv6 support: YES
         1544:20221206:085252.518 TLS support: YES
         1544:20221206:085252.518 ******************************
      There is a problem with the upgrade..

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1782

        #4
        Yeah, that has been a common problem in databases that have been created years ago in older MariaDB versions (at least). You can search for the error message (I'm sure you already did though), here is one example: https://www.zabbix.com/forum/zabbix-...e-5-4-db-error

        Markku

        Comment

        • Ziboux
          Junior Member
          • Apr 2019
          • 13

          #5
          Thank you, I will investigate and let the community knows about.

          Edit : Finally it's working again. Need to modifiy all table of the zb database Format_row to Dynamic.
          Reboot the server, after that it's OK.
          thank you for the help Markku
          Last edited by Ziboux; 07-12-2022, 10:32. Reason: Resolved

          Comment

          Working...