I believe I got the same issue with the
zoneminder.unraid docker image! I got this massive set of logs from the log output available through Unraid
Code: Select all
Starting services...
* Starting Apache httpd web server apache2
*
* Starting MariaDB database server mysqld
...done.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16762]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/bin/zmupdate.pl line 74.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16762]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16763]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/bin/zmupdate.pl line 74.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16763]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
Starting ZoneMinder:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jun 30 19:04:14 d1fcb8080590 zmpkg[16773]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 34.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
Jun 30 19:04:14 d1fcb8080590 zmpkg[16773]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
ZoneMinder failed to start
*** /etc/my_init.d/40_firstrun.sh failed with status 255
*** Killing all processes...
Jun 30 19:04:14 d1fcb8080590 syslog-ng[39]: syslog-ng shutting down; version='3.25.1'
*
* Starting MariaDB database server mysqld
...done.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16762]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/bin/zmupdate.pl line 74.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16762]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16763]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/bin/zmupdate.pl line 74.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
Jun 30 19:04:14 d1fcb8080590 zmupdate[16763]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
Starting ZoneMinder:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jun 30 19:04:14 d1fcb8080590 zmpkg[16773]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 34.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
Jun 30 19:04:14 d1fcb8080590 zmpkg[16773]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
ZoneMinder failed to start
*** /etc/my_init.d/40_firstrun.sh failed with status 255
*** Killing all processes...
Jun 30 19:04:14 d1fcb8080590 syslog-ng[39]: syslog-ng shutting down; version='3.25.1'
Doing the same steps as you worked! Specifically, I shut-down the container and added the NO_START_ZM variable and restarted the container. Then I loaded up the console for the container (I am using Unraid, there's a button to do it) and performed
service mysql restart after checking that there was a zm folder in that
/var/lib/mysql directory and then loaded zoneminder with
service zoneminder start and Zoneminder logged that it loaded successfully.
Thank you very much for this mate, it helped a lot!