Ad Widget

Collapse

update 3.4.5 > 3.4.6 failed with "database upgrade failed"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrea.g.els
    Junior Member
    • Jan 2018
    • 18

    #1

    update 3.4.5 > 3.4.6 failed with "database upgrade failed"

    just updated from 3.4.5 to 3.4.6 on centos 7
    db : mariaDB


    here the used repos :

    Code:
    [zabbix]
    baseurl = http://repo.zabbix.com/zabbix/3.4/rhel/7/$basearch/
    gpgcheck = 0
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
    name = Zabbix Official Repository - $basearch
    
    [zabbix-supported]
    baseurl = http://repo.zabbix.com/non-supported/rhel/7/$basearch/
    gpgcheck = 0
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
    name = Zabbix Official Repository non-supported - $basearch


    Code:
    root@utility2 zabbix]# grep zabbix-server ../yum.log
    Jan 09 02:13:25 Updated: zabbix-server-mysql-3.4.5-1.el7.x86_64
    Jan 16 05:06:37 Updated: zabbix-server-mysql-3.4.6-1.el7.x86_64
    the update failed with this error :
    Code:
      2230:20180116:051524.773 Starting Zabbix Server. Zabbix 3.4.6 (revision 76823).
      2230:20180116:051524.774 ****** Enabled features ******
      2230:20180116:051524.774 SNMP monitoring:           YES
      2230:20180116:051524.774 IPMI monitoring:           YES
      2230:20180116:051524.774 Web monitoring:            YES
      2230:20180116:051524.774 VMware monitoring:         YES
      2230:20180116:051524.774 SMTP authentication:       YES
      2230:20180116:051524.774 Jabber notifications:      YES
      2230:20180116:051524.774 Ez Texting notifications:  YES
      2230:20180116:051524.774 ODBC:                      YES
      2230:20180116:051524.774 SSH2 support:              YES
      2230:20180116:051524.774 IPv6 support:              YES
      2230:20180116:051524.774 TLS support:               YES
      2230:20180116:051524.774 ******************************
      2230:20180116:051524.774 using configuration file: /etc/zabbix/zabbix_server.conf
      2230:20180116:051524.779 current database version (mandatory/optional): 03040000/03040005
      2230:20180116:051524.779 required mandatory version: 03040000
      2230:20180116:051524.779 optional patches were found
      2230:20180116:051524.779 starting automatic database upgrade
      2230:20180116:051524.782 [Z3005] query failed: [1280] Incorrect index name 'problem_3' [create index problem_3 on problem (r_eventid)]
      2230:20180116:051524.783 database upgrade failed
    any clue ?
  • vso
    Zabbix developer
    • Aug 2016
    • 190

    #2
    Please do show create table problem; rename your index on r_eventid to problem_3
    Or simply skip optional patch
    update dbversion set optional=3040006;
    Last edited by vso; 16-01-2018, 19:58.

    Comment

    • andrea.g.els
      Junior Member
      • Jan 2018
      • 18

      #3
      this is the output of the show create table problem


      Code:
      CREATE TABLE `problem` (
        `eventid` bigint(20) unsigned NOT NULL,
        `source` int(11) NOT NULL DEFAULT '0',
        `object` int(11) NOT NULL DEFAULT '0',
        `objectid` bigint(20) unsigned NOT NULL DEFAULT '0',
        `clock` int(11) NOT NULL DEFAULT '0',
        `ns` int(11) NOT NULL DEFAULT '0',
        `r_eventid` bigint(20) unsigned DEFAULT NULL,
        `r_clock` int(11) NOT NULL DEFAULT '0',
        `r_ns` int(11) NOT NULL DEFAULT '0',
        `correlationid` bigint(20) unsigned DEFAULT NULL,
        `userid` bigint(20) unsigned DEFAULT NULL,
        PRIMARY KEY (`eventid`),
        KEY `problem_1` (`source`,`object`,`objectid`),
        KEY `problem_2` (`r_clock`),
        KEY `c_problem_2` (`r_eventid`),
        CONSTRAINT `c_problem_1` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
        CONSTRAINT `c_problem_2` FOREIGN KEY (`r_eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin

      I've tried to rename the index but i got the same error

      ERROR 1280 (42000): Incorrect index name

      Comment

      • vso
        Zabbix developer
        • Aug 2016
        • 190

        #4
        just skip this upgrade patch, you already have an index

        Comment

        • andrea.g.els
          Junior Member
          • Jan 2018
          • 18

          #5
          patch skipped , everything is fine.

          thank you

          Comment

          Working...