Ad Widget

Collapse

Problem after update zabbix to 7

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GGeraci
    Junior Member
    • Jun 2024
    • 4

    #1

    Problem after update zabbix to 7

    Dear all,

    this morning i upgraded zabbix from Zabbix 6.4.x rom to Zabbix 7.0.x on ubuntu 22.04

    I followed the guide but when I try to access the frontend I get the following message:

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

    using the command apt list --installed | grep zabbix
    ​​
    I get:

    zabbix-agent/zabbix,now 1:7.0.0-1+ubuntu22.04 amd64 [installed]
    zabbix-apache-conf/zabbix,now 1:7.0.0-1+ubuntu22.04 all [installed]
    zabbix-frontend-php/zabbix,now 1:7.0.0-1+ubuntu22.04 all [installed]
    zabbix-release/zabbix,now 1:7.0-1+ubuntu22.04 all [installed]
    zabbix-server-mysql/zabbix,now 1:7.0.0-1+ubuntu22.04 amd64 [installed]
    zabbix-sql-scripts/now 1:6.0.30-1+ubuntu22.04 all [installed,upgradable to: 1:7.0.0-1+ubuntu22.04]

    Could you please help me?
    ​​
  • hovav
    Junior Member
    • Jun 2024
    • 2

    #2
    I have exactly the same issue ?

    Comment

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

      #3
      The SQL scripts package is not needed after the initial Zabbix database install.

      For the version error in GUI, please restart the zabbix-server service and check zabbix_server.log for any error messages.

      Markku

      Comment

      • vijayk
        Senior Member
        • May 2023
        • 305

        #4
        Originally posted by GGeraci
        Dear all,

        this morning i upgraded zabbix from Zabbix 6.4.x rom to Zabbix 7.0.x on ubuntu 22.04

        I followed the guide but when I try to access the frontend I get the following message:

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

        using the command apt list --installed | grep zabbix

        I get:

        zabbix-agent/zabbix,now 1:7.0.0-1+ubuntu22.04 amd64 [installed]
        zabbix-apache-conf/zabbix,now 1:7.0.0-1+ubuntu22.04 all [installed]
        zabbix-frontend-php/zabbix,now 1:7.0.0-1+ubuntu22.04 all [installed]
        zabbix-release/zabbix,now 1:7.0-1+ubuntu22.04 all [installed]
        zabbix-server-mysql/zabbix,now 1:7.0.0-1+ubuntu22.04 amd64 [installed]
        zabbix-sql-scripts/now 1:6.0.30-1+ubuntu22.04 all [installed,upgradable to: 1:7.0.0-1+ubuntu22.04]

        Could you please help me?
        ​​
        I have received the same error and it's resolved by restart the server.
        Please verify the selinux settings also.
        Last edited by vijayk; 08-06-2024, 06:08.

        Comment

        • hovav
          Junior Member
          • Jun 2024
          • 2

          #5
          Originally posted by hovav
          I have exactly the same issue ?
          Problem solved.
          For me it was the DB password in the config file.

          Comment


          • dixie2k
            dixie2k commented
            Editing a comment
            I am having same issue during updating on Ubuntu 24.04

            zabbix-agent/zabbix,now 1:7.0.0-1+ubuntu24.04 amd64 [installed]
            zabbix-apache-conf/zabbix,now 1:7.0.0-1+ubuntu24.04 all [installed]
            zabbix-frontend-php/zabbix,now 1:7.0.0-1+ubuntu24.04 all [installed]
            zabbix-release/zabbix,now 1:7.0-1+ubuntu24.04 all [installed]
            zabbix-server-mysql/zabbix,now 1:7.0.0-1+ubuntu24.04 amd64 [installed]
            zabbix-sql-scripts/zabbix,now 1:7.0.0-1+ubuntu24.04 all [installed]

            I have checked the config file for DB user, name and password and it is correct. Rebooted server and still getting:
            The Zabbix database version does not match current requirements. Your database version: 6050035. Required version: 7000000. Please contact your system administrator.
        • dixie2k
          Junior Member
          • Jun 2024
          • 12

          #6
          Issue is resolved.

          I had to run this first:
          mysql> SET GLOBAL log_bin_trust_function_creators = 1;

          Then run the upgrade steps again and when done:

          mysql> SET GLOBAL log_bin_trust_function_creators = 0;

          Did a reboot and all working!

          Comment

        • GGeraci
          Junior Member
          • Jun 2024
          • 4

          #7
          Originally posted by dixie2k
          Issue is resolved.

          I had to run this first:
          mysql> SET GLOBAL log_bin_trust_function_creators = 1;

          Then run the upgrade steps again and when done:

          mysql> SET GLOBAL log_bin_trust_function_creators = 0;

          Did a reboot and all working!
          I did this before upgrade the zabbix version, for me the issue is still present.

          I did the following step:
          1. SET GLOBAL log_bin_trust_function_creators = 1;
          2. wget https://repo.zabbix.com/zabbix/7.0/u...u22.04_all.deb
          3. dpkg -i zabbix-release_7.0-1+ubuntu22.04_all.deb
          4. I have chosen to overwrite the old version of the files
          5. apt-get install --only-upgrade zabbix-server-mysql zabbix-frontend-php zabbix-agent
          6. apt-get install zabbix-apache-conf
          7. SET GLOBAL log_bin_trust_function_creators = 0
          8. Reboot
          9. The issue is still present.

          Comment

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

            #8
            I note that you specifically did not restart the zabbix-server service while log_bin_trust_function_creators was enabled. Please restart the service while that global setting is enabled.

            (To be clear: at least on Debian the Zabbix server service is not automatically restarted when the package is upgraded. But you are on Ubuntu, so check that the service is restarted before you disable the setting.)

            Markku
            Last edited by Markku; 26-06-2024, 17:48.

            Comment

            • GGeraci
              Junior Member
              • Jun 2024
              • 4

              #9
              Originally posted by Markku
              I note that you specifically did not restart the zabbix-server service while log_bin_trust_function_creators was enabled. Please restart the service while that global setting is enabled.

              (To be clear: at least on Debian the Zabbix server service is not automatically restarted when the package is upgraded. But you are on Ubuntu, so check that the service is restarted before you disable the setting.)

              Markku
              I tried again:
              1. dpkg --purge zabbix-release
              2. SET GLOBAL log_bin_trust_function_creators = 1;
              3. wget https://repo.zabbix.com/zabbix/7.0/u...u22.04_all.deb
              4. dpkg -i zabbix-release_7.0-1+ubuntu22.04_all.deb
              5. when prompted what to do with Zabbix configuration file, I keep the current version of “zabbix_server.conf“
              6. apt-get install --only-upgrade zabbix-server-mysql zabbix-frontend-php zabbix-agent
              7. apt-get install zabbix-apache-conf
              8. restart the zabbix-server service


              root@zabbix:/home/administrator# sudo cat /var/log/zabbix/zabbix_server.log | grep database
              1093:20240626:143812.757 current database version (mandatory/optional): 06000000/06000044
              3158:20240628:070818.955 current database version (mandatory/optional): 06000000/06000044
              3158:20240628:070818.957 starting automatic database upgrade
              3158:20240628:070818.963 completed 0% of database upgrade
              3158:20240628:070820.045 completed 1% of database upgrade
              3158:20240628:070821.506 completed 2% of database upgrade
              3158:20240628:070821.836 completed 3% of database upgrade
              3158:20240628:070823.157 completed 4% of database upgrade
              3158:20240628:070823.386 completed 5% of database upgrade
              3158:20240628:070823.645 completed 6% of database upgrade
              3158:20240628:070823.781 completed 7% of database upgrade
              3158:20240628:070825.169 completed 8% of database upgrade
              3158:20240628:070825.244 database upgrade failed on patch 06010049, exiting in 10 seconds


              Always the same stories...

              i checked /etc/zabbix/zabbix_server.conf and the DB password is ok

              Comment

              • GGeraci
                Junior Member
                • Jun 2024
                • 4

                #10
                I solved the issue!

                I did an update to zabbix 6.4.X and after that i tried again 7.0 and it worked.
                Last edited by GGeraci; 09-07-2024, 14:38.

                Comment

                • hakanozanlagan
                  Member
                  • Nov 2021
                  • 35

                  #11
                  adding below parameter in zabbix_server.conf solved my problem. I think This is a workaround not the real solution.

                  AllowUnsupportedDBVersions=1

                  Comment

                  • surfrock66
                    Member
                    • Jul 2018
                    • 30

                    #12
                    I found a solution that seems to work based on this post:

                    Zabbix 7.0出来了 没事做,准备升级下,之前安装参考我前一篇文章,docker安装zabbix 下载镜像 docker pull zabbix/zabbix-server-mysql:alpine-7.0-latest docker pull zabbix/zabbix-web-nginx-mysql:alpine-7.0-latest   升级zabbix-server-mysql docker stop zabbix-server-mysql docker rm zabbix-server-mysql […]


                    If I had more time to dig I would like to open up the actual patch this is failing on and inspect that this solution is logical, but since I don't have that, I yolo'd it and it worked in my home environment. I will be deploying it in my prod environments.

                    First, do

                    mysql -u root

                    Verify that is Off:

                    SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

                    Then fix the issue:

                    SET GLOBAL log_bin_trust_function_creators = 1;

                    Restart zabbix-server and the DB update will complete.

                    Comment

                    • cyber
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Dec 2006
                      • 4840

                      #13
                      Originally posted by surfrock66
                      I found a solution that seems to work based on this post:

                      Zabbix 7.0出来了 没事做,准备升级下,之前安装参考我前一篇文章,docker安装zabbix 下载镜像 docker pull zabbix/zabbix-server-mysql:alpine-7.0-latest docker pull zabbix/zabbix-web-nginx-mysql:alpine-7.0-latest   升级zabbix-server-mysql docker stop zabbix-server-mysql docker rm zabbix-server-mysql […]


                      If I had more time to dig I would like to open up the actual patch this is failing on and inspect that this solution is logical, but since I don't have that, I yolo'd it and it worked in my home environment. I will be deploying it in my prod environments.

                      First, do

                      mysql -u root

                      Verify that is Off:

                      SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

                      Then fix the issue:

                      SET GLOBAL log_bin_trust_function_creators = 1;

                      Restart zabbix-server and the DB update will complete.
                      This "solution" is first thing in Zabbix upgrade docs... Why dont you people just read ... https://www.zabbix.com/documentation...rade_notes_700

                      Comment

                      • Haidar
                        Junior Member
                        • Apr 2023
                        • 2

                        #14
                        i am facing the same issue by trying to upgrade from Zabbix 6.4.11 to 7.0 all Zabbix components are showing the right version but database still on the old version 06040000. user interface is also still working but it still shows the old version number
                        i already tried to
                        1. SET GLOBAL log_bin_trust_function_creators = 1;
                        2. restart upgrade
                        so the database should actually start the upgrade automatically which is not working for me !
                        i have debian 11 and mariadb
                        any one have an idea ?

                        Click image for larger version

Name:	image.png
Views:	5468
Size:	17.7 KB
ID:	494163

                        there is no errors to be seen in the log


                        database verion :
                        ​​​​

                        Comment

                        • cyber
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Dec 2006
                          • 4840

                          #15
                          Staring of your server (zabbix_server) should start your upgrade process...
                          You have some mess there.. some components point to 7.0.0 beta1, one to 7.0.2 and some to 7.0.5 try to fix this first....So it would be all same version...

                          Comment

                          Working...