Code: Select all
root@c2550:/usr/local/lib/zoneminder# aptitude show zoneminder
Package: zoneminder
Version: 1.34.22-focal1
State: partially configured
Automatically installed: no
Priority: optional
Section: net
Maintainer: Isaac Connor <isaac@zoneminder.com>
Architecture: amd64
I found the query_cache_limit= problem with upgrading to mysql 8.0 (see https://bugs.launchpad.net/ubuntu/+sour ... ug/1850895) and removed that from the configuration, so that mysql could start at all.
When rebooting and trying to start zoneminder it then became apparent that the database upgrade had failed during installation:
Code: Select all
root@c2550:/usr/local/lib/zoneminder# systemctl status zoneminder
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2020-11-22 20:02:28 PST; 7s ago
Process: 11058 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)
root@c2550:/usr/local/lib/zoneminder# journalctl -xe
Nov 22 20:03:11 c2550 zmpkg[11159]: FAT [Version mismatch, system is version 1.34.22, database is 1.30.4, please ru>
Nov 22 20:03:11 c2550 systemd[1]: zoneminder.service: Control process exited, code=exited, status=255/EXCEPTION
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit zoneminder.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 255.
Nov 22 20:03:11 c2550 systemd[1]: zoneminder.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit zoneminder.service has entered the 'failed' state with result 'exit-code'.
Nov 22 20:03:11 c2550 systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
-- Subject: A start job for unit zoneminder.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zoneminder.service has finished with a failure.
--
-- The job identifier is 2847 and the job result is failed.
lines 3690-3712/3712 (END)
Nov 22 20:03:11 c2550 zmpkg[11159]: FAT [Version mismatch, system is version 1.34.22, database is 1.30.4, please run zmupdate.pl to update.]
Nov 22 20:03:11 c2550 systemd[1]: zoneminder.service: Control process exited, code=exited, status=255/EXCEPTION
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit zoneminder.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 255.
Nov 22 20:03:11 c2550 systemd[1]: zoneminder.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit zoneminder.service has entered the 'failed' state with result 'exit-code'.
Nov 22 20:03:11 c2550 systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
-- Subject: A start job for unit zoneminder.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zoneminder.service has finished with a failure.
--
-- The job identifier is 2847 and the job result is failed.
Code: Select all
root@c2550:/usr/local/lib/zoneminder# /usr/bin/zmupdate.pl
Initiating database upgrade to version 1.34.22 from version 1.30.4
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :
Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp/zm if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n
Upgrading database to version 1.34.22
Loading config from DB 230 entries
Saving config to DB 230 entries
Upgrading DB to 1.31.0 from 1.30.4
mysql: [Warning] Using a password on the command line interface can be insecure.
Database successfully upgraded to version 1.31.0.
Upgrading DB to 1.31.1 from 1.30.4
mysql: [Warning] Using a password on the command line interface can be insecure.
Database successfully upgraded to version 1.31.1.
Upgrading DB to 1.31.2 from 1.30.4
mysql: [Warning] Using a password on the command line interface can be insecure.
Database successfully upgraded to version 1.31.2.
Upgrading DB to 1.31.3 from 1.30.4
mysql: [Warning] Using a password on the command line interface can be insecure.
Database successfully upgraded to version 1.31.3.
Upgrading DB to 1.31.4 from 1.30.4
mysql: [Warning] Using a password on the command line interface can be insecure.
Database successfully upgraded to version 1.31.4.
Upgrading DB to 1.31.5 from 1.30.4
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 16: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Groups ADD `ParentId` int(10) unsigned AFTER `Name`' at line 1
Output:
Command 'mysql -hlocalhost -uzmuser -p'zmpass' zm < /usr/share/zoneminder/db/zm_update-1.31.5.sql' exited with status: 1
root@c2550:/usr/local/lib/zoneminder#
Just to be sure I removed and reinstalled zoneminder, but no joy.
Is there a fix for this? Zeroing the db would wipe the camera configurations, which I could recreate easily enough, but this issue may be of interest to others as well. Thanks!