Ad Widget

Collapse

The frontend does not match Zabbix database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mohamad
    Junior Member
    • Jul 2017
    • 4

    #1

    The frontend does not match Zabbix database

    Hi,
    I am upgradding zabbix-server from 2.4.8 to 3.0 on a Centos 6 (to be more specific on a AMI Linux (aws) ). So i made the backups ,updated the repo and upgraded the packages, but i am getting this error on the frontend and zabbix_server log:

    Click image for larger version

Name:	photo5127377575268689837.jpg
Views:	1
Size:	15.5 KB
ID:	317963

    I understand that the frontend version doesn't match with the database version , but i don't know how to fix this.
    Can anyone help me please ?

    Thank you
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Please try starting Zabbix server.

    When zabbix_server is started, the database upgrade process is automatically executed.

    Comment

    • Mohamad
      Junior Member
      • Jul 2017
      • 4

      #3
      Hi Atsushi

      I Tried restarting zabbix-server , mysql and apache.... without success the zabbix-server log shows the same error that i posted above.

      Is there a way could i upgrade the database manualy ?

      Thank you

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Please tell me exactly what was output in the log of Zabbix server.
        The same error message as the Web is not output.

        For example, the following log is output.
        If the message called Completed is output, the upgrade is over.

        ex.
        Code:
         30488:20160916:103655.733 current database version (mandatory/optional): 02040000/02040000
         30488:20160916:103655.733 required mandatory version: 03020000
         30488:20160916:103655.733 starting automatic database upgrade
         30488:20160916:103655.836 completed 1% of database upgrade
         30488:20160916:103655.852 completed 2% of database upgrade
        
         30488:20160916:103657.732 completed 97% of database upgrade
         30488:20160916:103657.736 completed 98% of database upgrade
         30488:20160916:103657.737 completed 100% of database upgrade
         30488:20160916:103657.737 database upgrade fully completed
        Otherwise, an error message should be output.

        Comment

        • scimitar
          Junior Member
          • Aug 2017
          • 3

          #5
          I have such a similar problem. Upgrade from 3.2 to 3.4 under Centos7. This is in the logfile.

          1400:20170823:150149.086 using configuration file: /etc/zabbix/zabbix_server.conf
          1400:20170823:150149.088 current database version (mandatory/optional): 03030185/03030185
          1400:20170823:150149.088 required mandatory version: 03040000
          1400:20170823:150149.088 starting automatic database upgrade
          1400:20170823:150149.135 [Z3005] query failed: [1022] Can't write; duplicate key in table '#sql-4a3_13' [alter table items add constraint c_items_5 foreign key (master_itemid) references items (itemid) on delete cascade]
          1400:20170823:150149.136 database upgrade failed
          1431:20170823:150159.336 Starting Zabbix Server. Zabbix 3.4.0 (revision 71467).
          1431:20170823:150159.336 ****** Enabled features ******
          1431:20170823:150159.336 SNMP monitoring: YES
          1431:20170823:150159.336 IPMI monitoring: YES
          1431:20170823:150159.336 Web monitoring: YES
          1431:20170823:150159.336 VMware monitoring: YES
          1431:20170823:150159.336 SMTP authentication: YES
          1431:20170823:150159.336 Jabber notifications: YES
          1431:20170823:150159.336 Ez Texting notifications: YES
          1431:20170823:150159.336 ODBC: YES
          1431:20170823:150159.336 SSH2 support: YES
          1431:20170823:150159.336 IPv6 support: YES
          1431:20170823:150159.336 TLS support: YES
          1431:20170823:150159.336 ******************************

          Comment

          • chromaker
            Junior Member
            • Jan 2017
            • 3

            #6
            I have the same issue. Any new information?

            Comment

            • Mohamad
              Junior Member
              • Jul 2017
              • 4

              #7
              Hi chromaker,

              I resolved by editing the file in /etc/zabbix/web/zabbix.conf.php



              good luck !

              Comment

              • john988
                Junior Member
                • Jun 2019
                • 4

                #8
                Click image for larger version

Name:	database_ahread_of_frontend.PNG
Views:	28448
Size:	10.2 KB
ID:	381005 Hi guys. I do have a similar issue. In my case the database is ahead of the gui. Check the attached picture. But all packages are upgraded and on the same version. Can anyone help me?

                Thank you in advance.

                Comment


                • Atsushi
                  Atsushi commented
                  Editing a comment
                  If the web front end package has been upgraded, it should be reflected by restarting the web server or php-fpm. If that doesn't work, try clearing your web browser's cache.
              • john988
                Junior Member
                • Jun 2019
                • 4

                #9
                I did all of this already. It‘s because the frontend package checks somewhere, that it is still on version 4.0. but should be on version 4.2. I couldn‘t figure out by now, where the frontend package checks is own version.

                Comment

                • tedsimmons
                  Junior Member
                  • Jul 2019
                  • 3

                  #10
                  I tried starting Zabbix server but the problem still remains

                  Comment


                  • eric_ob
                    eric_ob commented
                    Editing a comment
                    I had the same problem, for me the issue was that during install I chose to replace all config files with the new version. I needed to edit /etc/zabbix/zabbix_server.conf to re-enter my database password.
                • john988
                  Junior Member
                  • Jun 2019
                  • 4

                  #11
                  Hi guys. Looks like, they fixed the issue with one of the last updates. It's working now. On my system 4.2.5 is now installed.

                  Comment

                  • OzCuRo
                    Junior Member
                    • Aug 2019
                    • 2

                    #12
                    I fixed it, editing zabbix_server.conf and put on DB parameters.

                    Comment

                    • tech.rss
                      Junior Member
                      • Oct 2019
                      • 10

                      #13
                      You follow below link for upgrade


                      When see The frontend does not match Zabbix database

                      Don't worry

                      So open tail -f /var/log/zabbix/zabbix_server.log

                      Now if you like below so wait for database upgrade complete

                      3886:20191125:174730.877 completed 23% of database upgrade
                      3886:20191125:174731.218 completed 25% of database upgrade
                      3886:20191125:174731.502 completed 26% of database upgrade
                      3886:20191125:174731.510 completed 27% of database upgrade
                      3886:20191125:174731.677 completed 28% of database upgrade
                      3886:20191125:174732.193 completed 29% of database upgrade
                      3886:20191125:174732.992 completed 30% of database upgrade
                      3886:20191125:174733.435 completed 31% of database upgrade
                      3886:20191125:174733.438 completed 32% of database upgrade
                      3886:20191125:174733.441 completed 34% of database upgrade
                      ............
                      ...........
                      3886:20191125:174837.274 completed 95% of database upgrade
                      3886:20191125:174837.362 completed 96% of database upgrade
                      3886:20191125:174837.528 completed 97% of database upgrade
                      3886:20191125:174838.055 completed 98% of database upgrade
                      3886:20191125:174838.170 completed 100% of database upgrade
                      3886:20191125:174838.170 database upgrade fully completed


                      Then again browse server ip. This is fix for upgrade zabbix database.

                      Thanks.

                      Comment

                      • newton.vela
                        Junior Member
                        • Jun 2021
                        • 1

                        #14
                        Sempre que nos fizermos um upgrade a base de dados são actualizada automaticamente, porém algumas configurações têm que ser feitas manualmente.

                        No meu caso, para resolver esse problema fiz o seguinte:
                        # nano /etc/zabbix/web/zabbix.conf.php

                        Edita segundo as tuas configurações:

                        <?php
                        // Zabbix GUI configuration file.
                        global $DB;

                        $DB['TYPE'] = 'POSTGRESQL';
                        $DB['SERVER'] = '127.0.0.1';
                        $DB['PORT'] = '0';
                        $DB['DATABASE'] = 'zabbix';
                        $DB['USER'] = 'zabbix';
                        $DB['PASSWORD'] = 'password';
                        $DB['DOUBLE_IEEE754'] = 'true';

                        // Schema name. Used for IBM DB2 and PostgreSQL.
                        $DB['SCHEMA'] = '';

                        $ZBX_SERVER = 'localhost';
                        $ZBX_SERVER_PORT = '10051';
                        $ZBX_SERVER_NAME = 'zabbix-server';

                        $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;


                        OBS: if you don't understand, use google-translate

                        Comment

                        Working...