Ad Widget

Collapse

Zabbix 4.4.8 to 5.0 Upgrade failure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markoetie
    Junior Member
    • Jun 2020
    • 1

    #1

    Zabbix 4.4.8 to 5.0 Upgrade failure

    Hi,

    I upgraded to the latest version following the upgrade procedures and notes. I tailed the server log and it returns the following on repeat.

    Code:
    1506:20200602:110601.185 current database version (mandatory/optional): 04040000/04040002
    1506:20200602:110601.185 required mandatory version: 05000000
    1506:20200602:110601.185 starting automatic database upgrade
    1506:20200602:110601.186 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: constraint "c_items_1" of relation "items" does not exist
    [alter table items drop constraint c_items_1]
    1506:20200602:110601.187 database upgrade failed
    Did anyone have (seen) this problem before? I guess the message explains itself but I don't know how to fix it.

    Running on:
    Debian 10.4 (Buster)
    PostgreSQL 11


    Thanks in advance.
  • jpsimmonds
    Junior Member
    • Jun 2020
    • 1

    #2
    I also get something similar, utilising all the Ubuntu or Alpine docker images

    Code:
    6:20200604:053623.397 Starting Zabbix Server. Zabbix 5.0.1 (revision c2a0b03).
    6:20200604:053623.397 ****** Enabled features ******
    6:20200604:053623.398 SNMP monitoring: YES
    6:20200604:053623.398 IPMI monitoring: YES
    6:20200604:053623.398 Web monitoring: YES
    6:20200604:053623.398 VMware monitoring: YES
    6:20200604:053623.398 SMTP authentication: YES
    6:20200604:053623.398 ODBC: YES
    6:20200604:053623.398 SSH support: YES
    6:20200604:053623.398 IPv6 support: YES
    6:20200604:053623.398 TLS support: YES
    6:20200604:053623.398 ******************************
    6:20200604:053623.398 using configuration file: /etc/zabbix/zabbix_server.conf
    6:20200604:053623.413 current database version (mandatory/optional): 04040000/04040002
    6:20200604:053623.413 required mandatory version: 05000000
    6:20200604:053623.413 starting automatic database upgrade
    6:20200604:053623.418 [Z3005] query failed: [1091] Can't DROP FOREIGN KEY `c_items_1`; check that it exists [alter table items drop foreign key c_items_1]
    6:20200604:053623.418 database upgrade failed

    Comment

    • NovaSatori
      Junior Member
      • Oct 2018
      • 13

      #3
      ALTER TABLE items ADD CONSTRAINT c_items_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE;
      CREATE INDEX items_1 ON items (hostid);

      Every f...ing time after upgrade...

      Comment

      Working...