Ad Widget

Collapse

Zabbix Database error after upgrading to 4.0 Alpha 8

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scuba
    Junior Member
    • Jun 2018
    • 16

    #1

    Zabbix Database error after upgrading to 4.0 Alpha 8

    Database error
    • The frontend does not match Zabbix database. Current database version (mandatory/optional): 3050110/3050110. Required mandatory version: 3050120. Contact your system administrator.

    Please help.
  • scuba
    Junior Member
    • Jun 2018
    • 16

    #2
    Previous version was Zabbix 4.0.0alpha7.

    Comment

    • dimir
      Zabbix developer
      • Apr 2011
      • 1080

      #3
      You need to install Zabbix server with the same version as frontend and then restart it. It will then perform the required database upgrade.

      Comment

      • scuba
        Junior Member
        • Jun 2018
        • 16

        #4
        zabbix-server.service - Zabbix Server
        Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
        Active: activating (auto-restart) (Result: exit-code) since Wed 2018-06-27 10:54:58 +03; 1s ago
        Process: 19042 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=1/FAILURE)
        Process: 19035 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
        Main PID: 19037 (code=exited, status=1/FAILURE)

        After yum update zabbbix-server don't start

        Comment

        • kernbug
          Senior Member
          • Feb 2013
          • 330

          #5
          Originally posted by scuba
          zabbix-server.service - Zabbix Server
          Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
          Active: activating (auto-restart) (Result: exit-code) since Wed 2018-06-27 10:54:58 +03; 1s ago
          Process: 19042 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=1/FAILURE)
          Process: 19035 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
          Main PID: 19037 (code=exited, status=1/FAILURE)

          After yum update zabbbix-server don't start
          Hi

          Show up your log from /var/log/zabbix/zabbix_server.log

          Comment

          • Skit81
            Junior Member
            • Jun 2018
            • 2

            #6
            Hi, I also have a problem with the zabbix update

            /var/log/zabbix/zabbix_server.log
            Code:
              5213:20180628:004631.477 database upgrade failed
              5222:20180628:004641.707 Starting Zabbix Server. Zabbix 4.0.0alpha8 (revision 81985).
              5222:20180628:004641.707 ****** Enabled features ******
              5222:20180628:004641.707 SNMP monitoring:           YES
              5222:20180628:004641.707 IPMI monitoring:           YES
              5222:20180628:004641.707 Web monitoring:            YES
              5222:20180628:004641.707 VMware monitoring:         YES
              5222:20180628:004641.707 SMTP authentication:       YES
              5222:20180628:004641.707 Jabber notifications:      YES
              5222:20180628:004641.707 Ez Texting notifications:  YES
              5222:20180628:004641.707 ODBC:                      YES
              5222:20180628:004641.707 SSH2 support:              YES
              5222:20180628:004641.707 IPv6 support:              YES
              5222:20180628:004641.707 TLS support:               YES
              5222:20180628:004641.707 ******************************
              5222:20180628:004641.707 using configuration file: /etc/zabbix/zabbix_server.conf
              5222:20180628:004641.727 current database version (mandatory/optional): 03050102/03050102
              5222:20180628:004641.727 required mandatory version: 03050120
              5222:20180628:004641.727 starting automatic database upgrade
              5222:20180628:004641.728 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ОШИБКА:  отношение "autoreg_host_2" уже существует
             [create index autoreg_host_2 on autoreg_host (proxy_hostid)]
              5222:20180628:004641.728 database upgrade failed

            Comment

            • kernbug
              Senior Member
              • Feb 2013
              • 330

              #7
              Originally posted by Skit81
              Hi, I also have a problem with the zabbix update
              Code:
              5222:20180628:004641.728 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ОШИБКА: отношение "autoreg_host_2" уже существует
              [create index autoreg_host_2 on autoreg_host (proxy_hostid)]
              Hi,
              Remove manually index autoreg_host_2 from autoreg_host (proxy_hostid) and start Zabbix Server again.
              https://dev.mysql.com/doc/refman/8.0/en/drop-index.html

              Comment

              • Skit81
                Junior Member
                • Jun 2018
                • 2

                #8
                Originally posted by kernbug
                Code:
                5222:20180628:004641.728 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ОШИБКА: отношение "autoreg_host_2" уже существует
                [create index autoreg_host_2 on autoreg_host (proxy_hostid)]
                Hi,
                Remove manually index autoreg_host_2 from autoreg_host (proxy_hostid) and start Zabbix Server again.
                https://dev.mysql.com/doc/refman/8.0/en/drop-index.html

                Thank you so much!

                sudo -u zabbix psql zabbix
                DROP INDEX autoreg_host_2;

                Comment


                • kernbug
                  kernbug commented
                  Editing a comment
                  Yep, PGRES_FATAL_ERROR from PostgreSQL Sorry)
              • scuba
                Junior Member
                • Jun 2018
                • 16

                #9
                Problem solved after waiting a while upgrading database ;

                19090:20180628:134830.341 completed 10% of database upgrade
                19090:20180628:134830.352 completed 15% of database upgrade
                19090:20180628:134830.423 completed 21% of database upgrade
                19090:20180628:134830.428 completed 26% of database upgrade
                19090:20180628:134830.430 completed 31% of database upgrade
                19090:20180628:134830.459 completed 36% of database upgrade
                19090:20180628:134830.510 completed 42% of database upgrade
                19090:20180628:134830.518 completed 47% of database upgrade
                19090:20180628:135001.657 slow query: 91.137851 sec, "alter table `events` add `severity` integer default '0' not null"
                19090:20180628:135001.665 completed 52% of database upgrade
                19090:20180628:135033.462 slow query: 31.796890 sec, "alter table `problem` add `acknowledged` integer default '0' not null"
                19090:20180628:135033.465 completed 57% of database upgrade
                19090:20180628:135058.862 slow query: 25.396694 sec, "alter table `problem` add `severity` integer default '0' not null"
                19090:20180628:135058.864 completed 63% of database upgrade
                19090:20180628:135059.130 completed 68% of database upgrade
                19090:20180628:135059.353 completed 73% of database upgrade
                19090:20180628:135059.540 completed 78% of database upgrade
                19090:20180628:135110.503 slow query: 10.962352 sec, "update problem set acknowledged=(select acknowledged from events where events.eventid=problem.eventid)"
                19090:20180628:135110.508 completed 84% of database upgrade
                19090:20180628:135115.073 completed 89% of database upgrade
                19090:20180628:135115.136 completed 94% of database upgrade
                19090:20180628:135115.142 completed 100% of database upgrade
                19090:20180628:135115.142 database upgrade fully completed

                Thank you all.

                Comment

                Working...