Ad Widget

Collapse

Zabbix Upgrade 5.2 : The Zabbix database version does not match current requirements.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Singularity
    Member
    • Aug 2020
    • 81

    #1

    Zabbix Upgrade 5.2 : The Zabbix database version does not match current requirements.

    I had zabbix server 5.0.4 running on one system with php 7.2.0 on ubuntu 18.04 and mysql 5.5 on another system.
    I updated php to 7.3, updated mysql to 8.0 and then updated zabbix 5.0.4 to 5.2, however I am getting this :
    The Zabbix database version does not match current requirements. Your database version: 5000000. Required version: 5020000
    Where have I gone wrong ? Please help ...

    mysql> select * from dbversion;
    +-----------+----------+
    | mandatory | optional |
    +-----------+----------+
    | 5000000 | 5000000 |
    +-----------+----------+
    1 row in set (0.08 sec)

    What changes do I need to perform to make it work ?
    Last edited by Singularity; 31-10-2020, 02:33.
  • lbjensen
    Junior Member
    Zabbix Certified Specialist
    • Apr 2013
    • 16

    #2
    Hi

    I had the same issue on my Raspberry pi
    But then I took the same database and installed on a uBuntu 20.04 and it worked like a charm with Zabbix 5.2 but with MySQL 8.0.22 instead of 10.3.25-MariaDB-0+deb10u1 Raspbian 10, but that should mean nothing

    Not sure what the problem is on my Raspberry Pi though, but I will try to find the error and update this thread

    Cheers
    Lars

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Originally posted by Singularity
      mysql> select * from dbversion;
      +-----------+----------+
      | mandatory | optional |
      +-----------+----------+
      | 5000000 | 5000000 |
      +-----------+----------+
      1 row in set (0.08 sec)

      What changes do I need to perform to make it work ?
      Look at zabbix_server.log, especially the section from after the first time you started up version 5.2.0. Are there error messages there from when zabbix_serverd attempted to update the database schema/version ?

      Comment


      • superamrx
        superamrx commented
        Editing a comment
        As I understand it, you only updated zabbix
        I also needed to update the web
        att-get install zabbix-web-mysql
    • markfree
      Senior Member
      • Apr 2019
      • 868

      #4
      I'm experiencing the same issue here on my RPi.
      I upgraded from Zabbix 4.4.4 to 5.2 and it all went well, but when I try to access the Web frontend it gives me a similar error message.

      I checked the log and it only shows this:
      Code:
      9945:20201101:222056.174 Starting Zabbix Server. Zabbix 5.2.0 (revision bcf99fb248).
      9945:20201101:222056.174 ****** Enabled features ******
      9945:20201101:222056.174 SNMP monitoring: YES
      9945:20201101:222056.174 IPMI monitoring: YES
      9945:20201101:222056.174 Web monitoring: YES
      9945:20201101:222056.174 VMware monitoring: YES
      9945:20201101:222056.174 SMTP authentication: YES
      9945:20201101:222056.174 ODBC: YES
      9945:20201101:222056.174 SSH support: YES
      9945:20201101:222056.175 IPv6 support: YES
      9945:20201101:222056.175 TLS support: YES
      9945:20201101:222056.175 ******************************
      9945:20201101:222056.175 using configuration file: /etc/zabbix/zabbix_server.conf
      9945:20201101:222056.179 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
      9945:20201101:222056.179 database is down: reconnecting in 10 seconds
      9945:20201101:222106.180 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
      9945:20201101:222106.181 database is down: reconnecting in 10 seconds
      9945:20201101:222116.182 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
      My database password is correct...
      Maybe the initial database schema is different from the older version.
      But I am not sure how to fix it.

      Comment

      • markfree
        Senior Member
        • Apr 2019
        • 868

        #5
        Since I copied my Zabbix DB password when updating Zabbix Server configuration file, I did not realize it was misspelled (at the vault! ).

        After correcting it I started Zabbix server but now it gives the same error but with another version.
        Database error
        The Zabbix database version does not match current requirements. Your database
        version: 5010043. Required version: 5020000. Please contact your system administrator.
        It seems the service is restarting endlessly.
        Code:
        $ sudo service zabbix-server status
        ● zabbix-server.service - Zabbix Server
        Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
        Active: activating (auto-restart) (Result: exit-code) since Sun 2020-11-01 23:05:01 -03; 2s ago
        Process: 29311 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
        Main PID: 29313 (code=exited, status=1/FAILURE)
        After checking my server log it shows some possible corruption errors.
        Code:
        26251:20201101:225839.058 Starting Zabbix Server. Zabbix 5.2.0 (revision bcf99fb248).
        26251:20201101:225839.058 ****** Enabled features ******
        26251:20201101:225839.058 SNMP monitoring: YES
        26251:20201101:225839.058 IPMI monitoring: YES
        26251:20201101:225839.058 Web monitoring: YES
        26251:20201101:225839.058 VMware monitoring: YES
        26251:20201101:225839.058 SMTP authentication: YES
        26251:20201101:225839.058 ODBC: YES
        26251:20201101:225839.058 SSH support: YES
        26251:20201101:225839.058 IPv6 support: YES
        26251:20201101:225839.058 TLS support: YES
        26251:20201101:225839.058 ******************************
        26251:20201101:225839.058 using configuration file: /etc/zabbix/zabbix_server.conf
        26251:20201101:225839.070 current database version (mandatory/optional): 04040000/04040002
        26251:20201101:225839.070 required mandatory version: 05020000
        26251:20201101:225839.070 starting automatic database upgrade
        (...)
        26251:20201101:225910.962 completed 87% of database upgrade
        [B]double free or [COLOR=#e74c3c]corruption[/COLOR] (!prev)[/B]
        26568:20201101:225921.413 Starting Zabbix Server. Zabbix 5.2.0 (revision bcf99fb248).
        26568:20201101:225921.414 ****** Enabled features ******
        26568:20201101:225921.414 SNMP monitoring: YES
        26568:20201101:225921.414 IPMI monitoring: YES
        26568:20201101:225921.415 Web monitoring: YES
        26568:20201101:225921.415 VMware monitoring: YES
        26568:20201101:225921.415 SMTP authentication: YES
        26568:20201101:225921.416 ODBC: YES
        26568:20201101:225921.416 SSH support: YES
        26568:20201101:225921.416 IPv6 support: YES
        26568:20201101:225921.416 TLS support: YES
        26568:20201101:225921.417 ******************************
        26568:20201101:225921.417 using configuration file: /etc/zabbix/zabbix_server.conf
        26568:20201101:225921.431 current database version (mandatory/optional): 05010043/05010043
        26568:20201101:225921.431 required mandatory version: 05020000
        26568:20201101:225921.431 starting automatic database upgrade
        [B][COLOR=#e74c3c]corrupted[/COLOR] size vs. prev_size[/B]
        (... more restarts ...)
        [B][COLOR=#e74c3c]corrupted[/COLOR] size vs. prev_size[/B]
        26805:20201101:225952.161 Starting Zabbix Server. Zabbix 5.2.0 (revision bcf99fb248).
        26805:20201101:225952.161 ****** Enabled features ******
        26805:20201101:225952.161 SNMP monitoring: YES
        26805:20201101:225952.161 IPMI monitoring: YES
        26805:20201101:225952.161 Web monitoring: YES
        26805:20201101:225952.161 VMware monitoring: YES
        26805:20201101:225952.161 SMTP authentication: YES
        26805:20201101:225952.161 ODBC: YES
        26805:20201101:225952.161 SSH support: YES
        26805:20201101:225952.161 IPv6 support: YES
        26805:20201101:225952.161 TLS support: YES
        26805:20201101:225952.161 ******************************
        26805:20201101:225952.161 using configuration file: /etc/zabbix/zabbix_server.conf
        26805:20201101:225952.168 current database version (mandatory/optional): 05010043/05010043
        26805:20201101:225952.169 required mandatory version: 05020000
        26805:20201101:225952.169 starting automatic database upgrade
        26805:20201101:225952.175 [B]Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x2800000]. Crashing ...[/B]
        26805:20201101:225952.175 ====== Fatal information: ======
        26805:20201101:225952.175 program counter not available for this architecture
        26805:20201101:225952.175 === Registers: ===
        26805:20201101:225952.175 register dump not available for this architecture
        26805:20201101:225952.175 === Backtrace: ===
        26805:20201101:225952.176 === Memory map: ===
        (... more dump ...)
        Any idea of why this corruption?

        Comment

        • markfree
          Senior Member
          • Apr 2019
          • 868

          #6
          Today I started the server again but with debug level 5.
          I have attached the log if it is of any help.
          Attached Files

          Comment

          • Singularity
            Member
            • Aug 2020
            • 81

            #7
            One thing is interesting here. I had mysql installed locally but it's been a while I used it for zabbix. When I went to its dbversion table, and saw it was upgraded . However the remote mysql which I have been using for zabbix, its not upgraded. I do not understand why is it so.
            Attached Files

            Comment

            • markfree
              Senior Member
              • Apr 2019
              • 868

              #8
              When upgrading my zabbix-server it asked me to review my configuration file and replace it or not with the new one.
              Have you specified a DBHost in your new configuration file after upgrading the server?
              Last edited by markfree; 02-11-2020, 21:49.

              Comment


              • Singularity
                Singularity commented
                Editing a comment
                I realized that soon after I saw that the queue is showing permission denied. What I feel is if there is configuration mismatch, I think it should appear in logs like database configuration mismatch or something like that which logs didn't had even after changing the debug level to 5. Or am I missing something here ?
            • hamsjelv
              Junior Member
              • Nov 2020
              • 2

              #9
              Hi,

              Im experiencing the same with my Rpi4 - tried different versions, nothing worked.

              running the latest kernel: Linux zbxpi 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux

              Code:
              4799:20201107:231633.394 query [txnlev:0] [show tables like 'dbversion']
              4799:20201107:231633.396 query [txnlev:0] [select mandatory,optional from dbversion]
              4799:20201107:231633.397 current database version (mandatory/optional): 05010043/05010043
              4799:20201107:231633.397 required mandatory version: 05010067
              4799:20201107:231633.397 starting automatic database upgrade
              Code:
              4221:20201107:231510.557 query [txnlev:0] [show tables like 'dbversion']
              4221:20201107:231510.559 query [txnlev:0] [select mandatory,optional from dbversion]
              4221:20201107:231510.559 current database version (mandatory/optional): 05010043/05010043
              4221:20201107:231510.559 required mandatory version: 05020000
              4221:20201107:231510.559 starting automatic database upgrade

              Code:
              4802:20201107:231643.708 query [txnlev:1] [insert into widget_field (widget_fieldid,widgetid,type,name,value_int,value _str,value_itemid,value_graphid) values (142,21,0,'source_type',1,'',null,null)]
              4802:20201107:231643.708 query [txnlev:1] [insert into widget_field (widget_fieldid,widgetid,type,name,value_int,value _str,value_itemid,value_graphid) values (143,21,4,'itemid',0,'',10013,null)]
              4802:20201107:231643.708 widgetid:21 dbid:3 type:graph
              4802:20201107:231643.708 widget type: graph w/h: 1x1 (x,y): (1,2)
              double free or corruption (!prev)
              Hope someone can help.

              /Hamsjelv

              Comment

              • markfree
                Senior Member
                • Apr 2019
                • 868

                #10
                There is another post related to this issue. And there is a ticket in bug tracker.
                I hope a solution is on the way.

                Comment

                • dimir
                  Zabbix developer
                  • Apr 2011
                  • 1080

                  #11
                  It's implemented, waiting for the QA Team to accept the fix, planned release for 5.2.2rc2 (or the packages for 5.2.2).

                  Comment

                  • hamsjelv
                    Junior Member
                    • Nov 2020
                    • 2

                    #12
                    I ended up building a ubuntu vm, installed mysql, restored my db and installed 5.2 to Force the upgrade... all went smooth and after the upgrade, create backup and restored it on my rpi.
                    this was a solution for me.

                    Comment

                    • Guilherme Neri
                      Junior Member
                      • Oct 2021
                      • 1

                      #13
                      Hi friend, my problem was solved when i created a new user for database, and set it on zabbix-server.conf. After that everything works. Cheers!

                      Comment

                      • Riiaaz
                        Junior Member
                        • Apr 2022
                        • 1

                        #14
                        Hi Guilherme Neri, my problem was solved when i created a new user for database, and set it on zabbix-server.conf. After that everything works. Thanks !

                        Comment

                        Working...