I'm upgrading Zabbix from 3.2 to 4.0 by migrating the database to a new VM and am getting the following error when I try to start zabbix-server after loading the database:
5588:20190729:163045.319 using configuration file: /etc/zabbix/zabbix_server.conf
5588:20190729:163045.328 current database version (mandatory/optional): 03050116/03050116
5588:20190729:163045.328 required mandatory version: 03050162
5588:20190729:163045.328 starting automatic database upgrade
5588:20190729:163045.329 [Z3005] query failed: [1048] Column 'acknowledged' cannot be null [update problem set acknowledged=(select acknowledged from events where events.eventid=problem.eventid)]
5588:20190729:163045.329 database upgrade failed
This problem is identical to the one reported here:
None of the acknowledged tables are NULL:
mysql> select acknowledged from events where acknowledged != 0;
Empty set (30.85 sec)
mysql> select acknowledged from problem where acknowledged != 0;
Empty set (2 min 20.71 sec)
mysql> select acknowledged from problem where acknowledged is NULL;
Empty set (0.01 sec)
mysql> select acknowledged from events where acknowledged is NULL;
Empty set (0.00 sec)
I suspect that there's something wrong with the SELECT command:
MariaDB [zabbix]> select acknowledged from events where events.eventid=problem.eventid;
ERROR 1054 (42S22): Unknown column 'problem.eventid' in 'where clause'
MariaDB [zabbix]> select acknowledged from problem where events.eventid=problem.eventid;
ERROR 1054 (42S22): Unknown column 'events.eventid' in 'where clause'
It seems like whichever table is not specified with FROM is unrecognized. I think that this results in "update problem set acknowledged" attempting to insert a NULL value. Specifying both tables makes acknowledged ambiguous:
MariaDB [zabbix]> select acknowledged from events, problem where events.eventid=problem.eventid;
ERROR 1052 (23000): Column 'acknowledged' in field list is ambiguous
One relevant piece of information is that while the problems table contains entries, the events table is empty:
MariaDB [zabbix]> select * from events;
Empty set (0.000 sec)
I'm using MariaDB (open-source MySQL) on the backend.
Does anyone have any suggestions for getting around this?
5588:20190729:163045.319 using configuration file: /etc/zabbix/zabbix_server.conf
5588:20190729:163045.328 current database version (mandatory/optional): 03050116/03050116
5588:20190729:163045.328 required mandatory version: 03050162
5588:20190729:163045.328 starting automatic database upgrade
5588:20190729:163045.329 [Z3005] query failed: [1048] Column 'acknowledged' cannot be null [update problem set acknowledged=(select acknowledged from events where events.eventid=problem.eventid)]
5588:20190729:163045.329 database upgrade failed
This problem is identical to the one reported here:
None of the acknowledged tables are NULL:
mysql> select acknowledged from events where acknowledged != 0;
Empty set (30.85 sec)
mysql> select acknowledged from problem where acknowledged != 0;
Empty set (2 min 20.71 sec)
mysql> select acknowledged from problem where acknowledged is NULL;
Empty set (0.01 sec)
mysql> select acknowledged from events where acknowledged is NULL;
Empty set (0.00 sec)
I suspect that there's something wrong with the SELECT command:
MariaDB [zabbix]> select acknowledged from events where events.eventid=problem.eventid;
ERROR 1054 (42S22): Unknown column 'problem.eventid' in 'where clause'
MariaDB [zabbix]> select acknowledged from problem where events.eventid=problem.eventid;
ERROR 1054 (42S22): Unknown column 'events.eventid' in 'where clause'
It seems like whichever table is not specified with FROM is unrecognized. I think that this results in "update problem set acknowledged" attempting to insert a NULL value. Specifying both tables makes acknowledged ambiguous:
MariaDB [zabbix]> select acknowledged from events, problem where events.eventid=problem.eventid;
ERROR 1052 (23000): Column 'acknowledged' in field list is ambiguous
One relevant piece of information is that while the problems table contains entries, the events table is empty:
MariaDB [zabbix]> select * from events;
Empty set (0.000 sec)
I'm using MariaDB (open-source MySQL) on the backend.
Does anyone have any suggestions for getting around this?
Comment