Ad Widget

Collapse

The Zabbix database version does not match current requirements.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bigAboo
    Junior Member
    • Mar 2019
    • 17

    #1

    The Zabbix database version does not match current requirements.

    Hi
    run an update of 5.4 Zabbix installation to 6.2 today and now stuck at the start with following error.

    Code:
    The Zabbix database version does not match current requirements. Your database version: 6010048. Required version: 6000000
    cat /var/log/zabbix/zabbix_server.log | grep database output is:

    Code:
    The server does not match Zabbix database. Current database version (mandatory/optional): 06010048/06010048. Required mandatory version: 06000000.
    596357:20221102:083310.873 database could be upgraded to use primary keys in history tables
    journalctl -xeu zabbix-server.service output is:

    Code:
     systemd[1]: zabbix-server.service: Can't open PID file /run/zabbix/zabbix_server.pid (yet?) after start: Operation not permitted
    ноя 02 08:34:50 srv-ubuntu-001 systemd[1]: zabbix-server.service: Failed with result 'protocol'.​
    ​
    zabbix_server.log

    Code:
    596719:20221102:083752.092 VMware monitoring: YES
    596719:20221102:083752.092 SMTP authentication: YES
    596719:20221102:083752.092 ODBC: YES
    596719:20221102:083752.092 SSH support: YES
    596719:20221102:083752.092 IPv6 support: YES
    596719:20221102:083752.092 TLS support: YES
    596719:20221102:083752.092 ******************************
    596719:20221102:083752.092 using configuration file: /etc/zabbix/zabbix_server.conf
    596719:20221102:083752.108 The server does not match Zabbix database. Current database version (mandatory/optional): 06010048/06010048. Required mandatory version: 06000000.
    596719:20221102:083752.110 database could be upgraded to use primary keys in history tables
    Appreciate any help,thank you​
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Please use the system's package management commands to display a sorted list of all the installed packages that have 'zabbix' in the name. For RPM-based system, it would be something like

    Code:
    rpm -qa | grep -E -i zabbix | sort
    If you're using an apt-based system, hopefully you know the equivalent command.

    It appears that at some point during the upgrade process, you had your system's package sources ("repos") pointing at one of the Zabbix beta or pre-release repos. You installed one of the 6.2 alpha or other pre-release, and when that specific version of zabbix-server was started, it upgraded your database schema from the schema used for 5.4 to the one used by the 6.2 alpha/beta releases, which is not the final schema version that would be used by a full 6.2.x release.

    You've not included the startup line from zabbix_server.log where the Zabbix server says its exact version, but considering it's now logging "Required mandator version: 06000000", you now somehow have one of the zabbix-server-6.0.x packages installed. The database schema was updated past that point when you had the alpha/beta version of 6.2 installed, so whatever zabbix-server-6.0.x you have installed can't run with the newer schema.

    What you want to do is get your package sources pointed to the correct upstream repository for the full 6.2 releases, and then get all the 6.2.x components installed, and start up zabbix-server. Hopefully, that will be able to update the database schema from the alpha/beta version you have to the final schema for 6.2

    Comment

    • bigAboo
      Junior Member
      • Mar 2019
      • 17

      #3
      Hi Tim, thank you for youre time

      Code:
      apt list --installed | grep zabbix
      
      WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
      
      zabbix-agent/now 1:6.0.9-1+ubuntu22.04 amd64 [установлен, может быть обновлён до: 1:6.0.10-1+ubuntu22.04]
      zabbix-frontend-php/now 1:6.0.9-1+ubuntu22.04 all [установлен, может быть обновлён до: 1:6.0.10-1+ubuntu22.04]
      zabbix-nginx-conf/now 1:6.0.9-1+ubuntu22.04 all [установлен, может быть обновлён до: 1:6.0.10-1+ubuntu22.04]
      zabbix-release/jammy,now 1:6.0-4+ubuntu22.04 all [установлен]
      zabbix-server-mysql/now 1:6.0.9-1+ubuntu22.04 amd64 [установлен, может быть обновлён до: 1:6.0.10-1+ubuntu22.04]
      zabbix-sql-scripts/now 1:6.0.9-1+ubuntu22.04 all [установлен, может быть обновлён до: 1:6.0.10-1+ubuntu22.04]

      Comment

      • bigAboo
        Junior Member
        • Mar 2019
        • 17

        #4
        Originally posted by tim.mooney
        Please use the system's package management commands to display a sorted list of all the installed packages that have 'zabbix' in the name. For RPM-based system, it would be something like

        [CODE]

        What you want to do is get your package sources pointed to the correct upstream repository for the full 6.2 releases, and then get all the 6.2.x components installed, and start up zabbix-server. Hopefully, that will be able to update the database schema from the alpha/beta version you have to the final schema for 6.2
        How can I do that?

        Code:
        apt list --installed | grep zabbix
        
        WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
        
        zabbix-agent/jammy,now 1:6.0.10-1+ubuntu22.04 amd64 [установлен]
        zabbix-frontend-php/jammy,now 1:6.0.10-1+ubuntu22.04 all [установлен]
        zabbix-nginx-conf/jammy,now 1:6.0.10-1+ubuntu22.04 all [установлен]
        zabbix-release/jammy,now 1:6.0-4+ubuntu22.04 all [установлен]
        zabbix-server-mysql/jammy,now 1:6.0.10-1+ubuntu22.04 amd64 [установлен]
        zabbix-sql-scripts/jammy,now 1:6.0.10-1+ubuntu22.04 all [установлен]

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #5
          I think the repo you want your system pointed to is the one you get (in Step 2) for this:

          Zabbix is being downloaded over 4 000 000 times every year for a reason. Download and install Zabbix for free and try it yourself!


          Basically, if you click the "Download" link on www.zabbix.com and then select 6.2 for "Zabbix Version", Ubuntu for "OS Distribution", Jammy 22.04 for "OS Version", all 3 components for "Zabbix Component", and then your database backend (which appears to be mysql) and your preferred web server (which appears to be nginx).

          If you follow the steps in "Step 2", that should get you the repo file.

          You may need to remove the "zabbix-release" that you currently have installed, as that's the thing that is pointing you at the 6.0 repo (rather than the 6.2 repo).

          There is a section in the documentation for upgrades that also goes into more detail:

          Comment

          • bigAboo
            Junior Member
            • Mar 2019
            • 17

            #6
            Originally posted by tim.mooney
            You may need to remove the "zabbix-release" that you currently have installed, as that's the thing that is pointing you at the 6.0 repo (rather than the 6.2 repo).

            There is a section in the documentation for upgrades that also goes into more detail:

            https://www.zabbix.com/documentation.../debian_ubuntu
            So I did that and now i get:
            Code:
            The Zabbix database version does not match current requirements. Your database version: 6020000. Required version: 6000000. ​
            Is it about mysql database?

            Code:
            650880:20221103:093322.369 current database version (mandatory/optional): 06010048/06010048
            650880:20221103:093322.369 starting automatic database upgrade
            650880:20221103:093323.604 completed 1% of database upgrade
            650880:20221103:093324.178 completed 3% of database upgrade
            650880:20221103:093324.756 completed 5% of database upgrade
            650880:20221103:093325.095 completed 7% of database upgrade
            650880:20221103:093325.721 completed 9% of database upgrade
            650880:20221103:093326.362 completed 11% of database upgrade
            650880:20221103:093326.682 completed 13% of database upgrade
            650880:20221103:093327.179 completed 15% of database upgrade
            650880:20221103:093327.829 completed 16% of database upgrade
            650880:20221103:093328.423 completed 18% of database upgrade
            650880:20221103:093328.981 completed 20% of database upgrade
            650880:20221103:093329.504 completed 22% of database upgrade
            650880:20221103:093329.795 completed 24% of database upgrade
            650880:20221103:093330.337 completed 26% of database upgrade
            650880:20221103:093330.848 completed 28% of database upgrade
            650880:20221103:093331.262 completed 30% of database upgrade
            650880:20221103:093331.837 completed 32% of database upgrade
            650880:20221103:093332.323 completed 33% of database upgrade
            650880:20221103:093332.631 completed 35% of database upgrade
            650880:20221103:093333.171 completed 37% of database upgrade
            650880:20221103:093334.290 completed 39% of database upgrade
            650880:20221103:093334.606 completed 41% of database upgrade
            650880:20221103:093335.087 completed 43% of database upgrade
            650880:20221103:093335.637 completed 45% of database upgrade
            650880:20221103:093336.157 completed 47% of database upgrade
            650880:20221103:093337.889 completed 49% of database upgrade
            650880:20221103:093338.690 completed 50% of database upgrade
            650880:20221103:093347.573 completed 52% of database upgrade
            650880:20221103:093348.031 completed 54% of database upgrade
            650880:20221103:093354.348 completed 56% of database upgrade
            650880:20221103:093354.831 completed 58% of database upgrade
            650880:20221103:093402.387 completed 60% of database upgrade
            650880:20221103:093402.762 completed 62% of database upgrade
            650880:20221103:093407.664 completed 64% of database upgrade
            650880:20221103:093408.112 completed 66% of database upgrade
            650880:20221103:093413.356 completed 67% of database upgrade
            650880:20221103:093413.789 completed 69% of database upgrade
            650880:20221103:093418.348 completed 71% of database upgrade
            650880:20221103:093418.806 completed 73% of database upgrade
            650880:20221103:093419.545 completed 75% of database upgrade
            650880:20221103:093419.964 completed 77% of database upgrade
            650880:20221103:093424.897 completed 79% of database upgrade
            650880:20221103:093425.256 completed 81% of database upgrade
            650880:20221103:093426.064 completed 83% of database upgrade
            650880:20221103:093426.547 completed 84% of database upgrade
            650880:20221103:093431.797 completed 86% of database upgrade
            650880:20221103:093432.296 completed 88% of database upgrade
            650880:20221103:093432.489 completed 90% of database upgrade
            650880:20221103:093433.155 completed 92% of database upgrade
            650880:20221103:093433.181 completed 94% of database upgrade
            650880:20221103:093434.114 completed 96% of database upgrade
            650880:20221103:093434.164 completed 98% of database upgrade
            650880:20221103:093434.531 completed 100% of database upgrade
            650880:20221103:093434.541 database upgrade fully completed
            650880:20221103:093434.543 database could be upgraded to use primary keys in history tables

            Comment

            • bigAboo
              Junior Member
              • Mar 2019
              • 17

              #7
              I did

              Code:
               SET @@max_execution_time=0;
              INSERT IGNORE INTO history SELECT * FROM history_old;
              INSERT IGNORE INTO history_uint SELECT * FROM history_uint_old;
              INSERT IGNORE INTO history_str SELECT * FROM history_str_old;
              INSERT IGNORE INTO history_log SELECT * FROM history_log_old;
              INSERT IGNORE INTO history_text SELECT * FROM history_text_old;
              and get

              Code:
              650880:20221103:093434.541 database upgrade fully completed
              650880:20221103:093434.543 database could be upgraded to use primary keys in history tables
              674119:20221103:160408.846 current database version (mandatory/optional): 06020000/06020003

              Comment

              • tim.mooney
                Senior Member
                • Dec 2012
                • 1427

                #8
                I'm confused. You successfully installed Zabbix 6.2.x and started zabbix-server 6.2.x at one point, because it it upgraded your database schema to the one that is expected for Zabbix 6.2.x.

                But you're still seeing a message that the "Required version" is only 6000000, which would mean Zabbix 6.0.x. That should not be happening if you're running zabbix-server 6.2.x.

                Do you have two versions of Zabbix server installed?

                If you shut down the zabbix-server process and then restart it, what are the full set of messages it logs when it restarts, including the version and all enabled options?​

                Comment

                • bigAboo
                  Junior Member
                  • Mar 2019
                  • 17

                  #9
                  Finaly database start work somehow by itself!)) Thank you for support and attention

                  Comment

                  • GerryBass
                    Junior Member
                    • Oct 2022
                    • 4

                    #10
                    Hi, ... I just upgrade from 6.2.3 to 6.4

                    I got:
                    The Zabbix database version does not match current requirements. Your database version: 6020000. Required version: 6040000.

                    I review all step and at the end I check the actual version.

                    root@cpopapzab01:~# apt list --installed | grep zabbix

                    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

                    zabbix-agent/unknown,now 1:6.4.0-1+debian11 amd64 [installed]
                    zabbix-apache-conf/now 1:6.2.3-1+debian11 all [installed,upgradable to: 1:6.4.0-1+debian11]
                    zabbix-frontend-php/unknown,now 1:6.4.0-1+debian11 all [installed]
                    zabbix-release/unknown,now 1:6.4-1+debian11 all [installed]
                    zabbix-sender/now 1:6.2.3-1+debian11 amd64 [installed,upgradable to: 1:6.4.0-1+debian11]
                    zabbix-server-mysql/unknown,now 1:6.4.0-1+debian11 amd64 [installed]
                    zabbix-sql-scripts/now 1:6.2.3-1+debian11 all [installed,upgradable to: 1:6.4.0-1+debian11]
                    root@cpopapzab01:~#​

                    I re-installed the failed one individually like this

                    apt-get install --only-upgrade zabbix-frontend-php
                    apt-get install --only-upgrade zabbix-apache-conf
                    apt-get install --only-upgrade zabbix-sender​

                    Now I have this:

                    zabbix-agent/unknown,now 1:6.4.0-1+debian11 amd64 [installed]
                    zabbix-apache-conf/unknown,now 1:6.4.0-1+debian11 all [installed]
                    zabbix-frontend-php/unknown,now 1:6.4.0-1+debian11 all [installed]
                    zabbix-release/unknown,now 1:6.4-1+debian11 all [installed]
                    zabbix-sender/unknown,now 1:6.4.0-1+debian11 amd64 [installed]
                    zabbix-server-mysql/unknown,now 1:6.4.0-1+debian11 amd64 [installed]
                    zabbix-sql-scripts/unknown,now 1:6.4.0-1+debian11 all [installed]
                    root@cpopapzab01:~#

                    Reboot Zabbix server, .. clear browser cash, etc ...

                    I still have the same message !!!

                    Database error
                    • The Zabbix database version does not match current requirements. Your database version: 6020000. Required version: 6040000. Please contact your system administrator.


                    Someone can help me ?
                    Thanks a lot.​

                    Comment

                    • valeryf
                      Junior Member
                      • Jun 2022
                      • 10

                      #11
                      That's weird indeed,

                      Having all packages in 6.4 should have upgraded your database schemes to cope with last version.

                      Comment

                      • abelh
                        Junior Member
                        • Mar 2023
                        • 1

                        #12
                        I have exactly the same issue. I updated from 6.2 to 6.4 and now I have the error:
                        • The Zabbix database version does not match current requirements. Your database version: 6030010. Required version: 6040000. Please contact your system administrator.
                        root@zabbix-server:~# apt list --installed | grep zabbix

                        WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

                        zabbix-agent/jammy,now 1:6.4.0-1+ubuntu22.04 amd64 [installed]
                        zabbix-apache-conf/jammy,now 1:6.4.0-1+ubuntu22.04 all [installed]
                        zabbix-frontend-php/jammy,now 1:6.4.0-1+ubuntu22.04 all [installed]
                        zabbix-get/jammy,now 1:6.4.0-1+ubuntu22.04 amd64 [installed]
                        zabbix-release/jammy,now 1:6.4-1+ubuntu22.04 all [installed]
                        zabbix-server-mysql/jammy,now 1:6.4.0-1+ubuntu22.04 amd64 [installed]
                        zabbix-sql-scripts/jammy,now 1:6.4.0-1+ubuntu22.04 all [installed]

                        I do not know what to do from here.

                        Comment

                      • FleuryMai
                        Junior Member
                        • Mar 2023
                        • 1

                        #13
                        Hi guys,
                        After upgrade 6.0 to 6.4 i have the same problem.... but : after this it's good !!!

                        Comment

                        • Jeroaarts
                          Junior Member
                          • Oct 2019
                          • 3

                          #14
                          Same for me, that resolved the problem too.

                          Comment

                          • grohlfer
                            Junior Member
                            • Apr 2024
                            • 7

                            #15
                            Hi folks!
                            I have just made a fresh install, having downloaded and installed Zabbix on Debian 11 (Bullseye), according to the recipe found on the Zabbix website:
                            https://www.zabbix.com/download?zabb...debian&os_vers ion=11&components=server_frontend_agent&db=mysql&w s=apache

                            After following all the steps (twice!) I keep getting the same annoying error message:
                            The server does not match Zabbix database. Current database version (mandatory/optional): 06040000/06040026. Required mandatory version: 05000000.

                            What am I missing here?

                            I know you'd ask, so here's how my /etc/zabbix/web/zabbix.conf.php file looks like:
                            Code:
                            <?php
                            // Zabbix GUI configuration file.
                            
                            $DB['TYPE'] = 'MYSQL';
                            $DB['SERVER'] = 'localhost';
                            $DB['PORT'] = '0';
                            $DB['DATABASE'] = 'zabbix';
                            $DB['USER'] = 'zabbix';
                            $DB['PASSWORD'] = 'XXXXXX';
                            
                            // Schema name. Used for PostgreSQL.
                            $DB['SCHEMA'] = '';
                            
                            // Used for TLS connection.
                            $DB['ENCRYPTION'] = false;
                            $DB['KEY_FILE'] = '';
                            $DB['CERT_FILE'] = '';
                            $DB['CA_FILE'] = '';
                            $DB['VERIFY_HOST'] = false;
                            $DB['CIPHER_LIST'] = '';
                            
                            // Vault configuration. Used if database credentials are stored in Vault secrets manager.
                            $DB['VAULT'] = '';
                            $DB['VAULT_URL'] = '';
                            $DB['VAULT_DB_PATH'] = '';
                            $DB['VAULT_TOKEN'] = '';
                            $DB['VAULT_CERT_FILE'] = '';
                            $DB['VAULT_KEY_FILE'] = '';
                            // Uncomment to bypass local caching of credentials.
                            // $DB['VAULT_CACHE'] = true;
                            
                            // Use IEEE754 compatible value range for 64-bit Numeric (float) history values.
                            // This option is enabled by default for new Zabbix installations.
                            // For upgraded installations, please read database upgrade notes before enabling this option.
                            $DB['DOUBLE_IEEE754'] = true;
                            
                            // Uncomment and set to desired values to override Zabbix hostname/IP and port.
                            // $ZBX_SERVER = '';
                            // $ZBX_SERVER_PORT = '';
                            
                            $ZBX_SERVER_NAME = 'ZabbixHome';
                            
                            $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
                            
                            // Uncomment this block only if you are using Elasticsearch.
                            // Elasticsearch url (can be string if same url is used for all types).
                            //$HISTORY['url'] = [
                            // 'uint' => 'http://localhost:9200',
                            // 'text' => 'http://localhost:9200'
                            //];
                            // Value types stored in Elasticsearch.
                            //$HISTORY['types'] = ['uint', 'text'];
                            
                            // Used for SAML authentication.
                            // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.
                            //$SSO['SP_KEY'] = 'conf/certs/sp.key';
                            //$SSO['SP_CERT'] = 'conf/certs/sp.crt';
                            //$SSO['IDP_CERT'] = 'conf/certs/idp.crt';
                            //$SSO['SETTINGS'] = [];
                            ​

                            also, here's the content of /var/log/zabbix/zabbix_server.log file:
                            Code:
                            32203:20240331:192831.831 Starting Zabbix Server. Zabbix 5.0.8 (revision d3c78f993a).
                            32203:20240331:192831.831 ****** Enabled features ******
                            32203:20240331:192831.831 SNMP monitoring: YES
                            32203:20240331:192831.832 IPMI monitoring: YES
                            32203:20240331:192831.832 Web monitoring: YES
                            32203:20240331:192831.832 VMware monitoring: YES
                            32203:20240331:192831.832 SMTP authentication: YES
                            32203:20240331:192831.832 ODBC: YES
                            32203:20240331:192831.832 SSH support: YES
                            32203:20240331:192831.832 IPv6 support: YES
                            32203:20240331:192831.832 TLS support: YES
                            32203:20240331:192831.832 ******************************
                            32203:20240331:192831.832 using configuration file: /etc/zabbix/zabbix_server.conf
                            32203:20240331:192831.842 The server does not match Zabbix database. Current database version (mandatory/optional): 06040000/06040026. Required mandatory version: 05000000.
                            32337:20240331:193334.571 Starting Zabbix Server. Zabbix 5.0.8 (revision d3c78f993a).
                            32337:20240331:193334.571 ****** Enabled features ******
                            32337:20240331:193334.571 SNMP monitoring: YES
                            32337:20240331:193334.571 IPMI monitoring: YES
                            32337:20240331:193334.571 Web monitoring: YES
                            32337:20240331:193334.571 VMware monitoring: YES
                            32337:20240331:193334.571 SMTP authentication: YES
                            32337:20240331:193334.571 ODBC: YES
                            32337:20240331:193334.571 SSH support: YES
                            32337:20240331:193334.572 IPv6 support: YES
                            32337:20240331:193334.572 TLS support: YES
                            32337:20240331:193334.572 ******************************
                            32337:20240331:193334.572 using configuration file: /etc/zabbix/zabbix_server.conf
                            32337:20240331:193334.583 The server does not match Zabbix database. Current database version (mandatory/optional): 06040000/06040026. Required mandatory version: 05000000.
                            ​
                            I also googled for some help, but apart from a guy that recommended to update zabbix database table dbversion directly (
                            Code:
                            update dbversion set mandatory=06040000,optional=06040000;
                            ), I had no luck!
                            Besides, updating dbversion does solve the problem, but creates others (you can't log in anymore).

                            Any ideas?
                            Thanks!
                            Grohlfer

                            Comment

                            Working...