Ad Widget

Collapse

DB upgrade fails after upgrade (3.0->3.2)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aaddiikk
    Junior Member
    • Sep 2016
    • 3

    #1

    DB upgrade fails after upgrade (3.0->3.2)

    Dear collaragues,

    Today, while trying to upgrade our Zabbix installation from 3.0.4 to 3.2.0, I have faced following issue:

    Code:
    4151:20160917:102736.396 Starting Zabbix Server. Zabbix 3.2.0 (revision 62485).
      4151:20160917:102736.397 ****** Enabled features ******
      4151:20160917:102736.397 SNMP monitoring:           YES
      4151:20160917:102736.397 IPMI monitoring:           YES
      4151:20160917:102736.397 Web monitoring:            YES
      4151:20160917:102736.397 VMware monitoring:         YES
      4151:20160917:102736.397 SMTP authentication:       YES
      4151:20160917:102736.397 Jabber notifications:      YES
      4151:20160917:102736.397 Ez Texting notifications:  YES
      4151:20160917:102736.397 ODBC:                      YES
      4151:20160917:102736.397 SSH2 support:              YES
      4151:20160917:102736.397 IPv6 support:              YES
      4151:20160917:102736.397 TLS support:               YES
      4151:20160917:102736.397 ******************************
      4151:20160917:102736.398 using configuration file: /etc/zabbix/zabbix_server.conf
      4151:20160917:102736.448 current database version (mandatory/optional): 03010006/03010006
      4151:20160917:102736.448 required mandatory version: 03020000
      4151:20160917:102736.448 starting automatic database upgrade
      4151:20160917:102736.449 [Z3005] query failed: [1061] Duplicate key name 'trigger_tag_1' [create index trigger_tag_1 on trigger_tag (triggerid)]
      4151:20160917:102736.450 database upgrade failed
    Some details about affected machine:
    Centos 7 (3.10.0-327.28.3.el7.x86_64)
    MariaDB backend (on a different machine)
    Upgrade performed from official Zabbix repo using yum update

    Any ideas how can we complete the upgrade procedure...?
  • aaddiikk
    Junior Member
    • Sep 2016
    • 3

    #2
    Well, something is really messed up now...

    I tried to drop duplicate index on the table by issuing following command:
    Code:
    MariaDB [zabbixdb]> alter table trigger_tag drop index trigger_tag_1;
    Query OK, 0 rows affected (0.02 sec)
    Records: 0  Duplicates: 0  Warnings: 0
    but now I get following error:

    Code:
     12971:20160919:181129.127 Starting Zabbix Server. Zabbix 3.2.0 (revision 62485).
     12971:20160919:181129.127 ****** Enabled features ******
     12971:20160919:181129.127 SNMP monitoring:           YES
     12971:20160919:181129.127 IPMI monitoring:           YES
     12971:20160919:181129.127 Web monitoring:            YES
     12971:20160919:181129.127 VMware monitoring:         YES
     12971:20160919:181129.127 SMTP authentication:       YES
     12971:20160919:181129.127 Jabber notifications:      YES
     12971:20160919:181129.127 Ez Texting notifications:  YES
     12971:20160919:181129.127 ODBC:                      YES
     12971:20160919:181129.127 SSH2 support:              YES
     12971:20160919:181129.127 IPv6 support:              YES
     12971:20160919:181129.127 TLS support:               YES
     12971:20160919:181129.127 ******************************
     12971:20160919:181129.127 using configuration file: /etc/zabbix/zabbix_server.conf
     12971:20160919:181129.186 current database version (mandatory/optional): 03010007/03010007
     12971:20160919:181129.186 required mandatory version: 03020000
     12971:20160919:181129.186 starting automatic database upgrade
     12971:20160919:181129.191 [Z3005] query failed: [1005] Can't create table `zabbixdb`.`#sql-1133_ca` (errno: 150 "Foreign key constraint is incorrectly formed") [alter table trigger_tag add constraint c_trigger_tag_1 foreign key (triggerid) references triggers (triggerid) on delete cascade]
     12971:20160919:181129.191 database upgrade failed
    I believe someone from the dev team (with knowledge about database structure) can only help here as google knows nothing about it...

    Comment

    • sles
      Member
      • Oct 2005
      • 80

      #3

      Comment

      Working...