Page 1 of 1

Zoneminder crashing after updates

Posted: Wed Jan 06, 2021 6:41 pm
by huquad
Hello all! I've been running Zoneminder problem-free in an Unraid docker (dlandon's) for about 6 months now. I recently updated both my MariaDB and Zoneminder containers and now am getting this error upon starting the Zoneminder docker:

Code: Select all

Starting services...
* Starting Apache httpd web server apache2
*
* Starting MariaDB database server mysqld
...done.
Jan 6 12:31:24 ecbc3366271c /etc/mysql/debian-start[761]: Upgrading MySQL tables if necessary.
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jan 6 12:31:24 ecbc3366271c zmupdate[762]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) error val:]
Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/ZoneMinder/Config.pm line 96.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 147.
Compilation failed in require at /usr/bin/zmupdate.pl line 73.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 73.
Jan 6 12:31:24 ecbc3366271c zmupdate[762]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) error val:]
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jan 6 12:31:24 ecbc3366271c zmupdate[782]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) error val:]
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/ZoneMinder/Config.pm line 96.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 147.
Compilation failed in require at /usr/bin/zmupdate.pl line 73.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 73.
Jan 6 12:31:24 ecbc3366271c zmupdate[782]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) error val:]
Starting ZoneMinder:
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jan 6 12:31:24 ecbc3366271c zmpkg[792]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) error val:]
DBI connect('database=zm;mysql_socket=/new/mysql/mysql.sock','zmuser',...) failed: Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/ZoneMinder/Config.pm line 96.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 147.
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.
Jan 6 12:31:24 ecbc3366271c zmpkg[792]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/new/mysql/mysql.sock' (2) error val:]
ZoneMinder failed to start

*** /etc/my_init.d/40_firstrun.sh failed with status 255

*** Killing all processes...
Jan 6 12:31:24 ecbc3366271c syslog-ng[19]: syslog-ng shutting down; version='3.25.1'
I've already tried looking online for a solution but have come up with nothing. Any suggestions?

Re: Zoneminder crashing after updates

Posted: Wed Jan 06, 2021 8:27 pm
by Magic919
You need to get the database running according to that output.

Re: Zoneminder crashing after updates

Posted: Thu Jan 07, 2021 3:31 pm
by huquad
I don't understand your reply. Can you elaborate?

Re: Zoneminder crashing after updates

Posted: Thu Jan 07, 2021 3:42 pm
by Magic919
It says

Code: Select all

Can't connect to local MySQL server through socket '/new/mysql/mysql.sock'
Presumably you can relate that to your architecture. You mention you updated the DB container.

Re: Zoneminder crashing after updates

Posted: Thu Jan 07, 2021 4:29 pm
by huquad
I believe that its actually nothing to do with the MariaDB Container. I think its an issue with permissions and here's why. Whenever I copy/paste/move folders in and out of the directory, it creates errors. I think that my drive was full and overloaded some info onto my main pool from the cache. When it moved back, the permissions got screwed up. I've seen a lot of posts relating this issue to permissions, but none of them really have a solution. My solution at this point is to completely start over, but I'm dreading having to do everything all from the ground up. If you don't know how to fix it, that's fine too. All I have is time to waste at this point.

Re: Zoneminder crashing after updates

Posted: Thu Jan 07, 2021 4:55 pm
by Magic919
I have ZM, I have Docker, but I don’t run ZM in Docker. The standard ZM Docker arrangement runs as a single container as far as I understand.

I’d have thought you could recover the DB and that’s a large part of the configuration.

Re: Zoneminder crashing after updates

Posted: Wed Jan 13, 2021 12:16 pm
by bkjaya1952
Try and see the following docker zoneminder .

https://hub.docker.com/r/bkjaya1952/doc ... 7.4-mysql8