Beim Updaten von Zabbix 3.4 auf 4.0 startete der Zabbix Server nicht mehr. Als ich ins log schaute, fand ich folgende Fehlermeldungen:
current database version (mandatory/optional): 03040000/03040007
required mandatory version: 04000000
starting automatic database upgrade
...
25862:20181007:104142.929 [Z3005] query failed: [1050] Table 'tag_filter' already exists [create table tag_filter (
`tag_filterid` bigint unsigned not null,
`usrgrpid` bigint unsigned not null,
`groupid` bigint unsigned not null,
`tag` varchar(255) default '' not null,
`value` varchar(255) default '' not null,
primary key (tag_filterid)
) engine=innodb]
2301:20181007:105802.685 query [txnlev:1] [create table task_check_now (
`taskid` bigint unsigned not null,
`itemid` bigint unsigned not null,
primary key (taskid)
) engine=innodb]
2301:20181007:105802.692 [Z3005] query failed: [1050] Table 'task_check_now' already exists [create table task_check_now (
`taskid` bigint unsigned not null,
`itemid` bigint unsigned not null,
primary key (taskid)
) engine=innodb]
2301:20181007:105802.693 query [create table task_check_now (
`taskid` bigint unsigned not null,
`itemid` bigint unsigned not null,
primary key (taskid)
) engine=innodb] failed, setting transaction as failed
Lösung:
Ich habe die MySQL Tabellen für tag_filter
und task_check_now
gelöscht. Nach dem Starten des Zabbix Server kam keine Fehlermeldung und das Updaten der Datenbank funktionierte.
DROP TABLE tag_filter;
DROP TABLE task_check_now;
Um sicher zugehen, dass Ihr an der Stelle nichts falsch macht, solltet ihr vorher ein Backup der Datenbank machen.