Zoneminder crashing after updates

Forum for questions and support relating to 1.35.x development only.
Post Reply
huquad
Posts: 3
Joined: Wed Jan 06, 2021 6:37 pm

Zoneminder crashing after updates

Post by huquad » Wed Jan 06, 2021 6:41 pm

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?

Magic919
Posts: 409
Joined: Wed Sep 18, 2013 6:56 am

Re: Zoneminder crashing after updates

Post by Magic919 » Wed Jan 06, 2021 8:27 pm

You need to get the database running according to that output.

huquad
Posts: 3
Joined: Wed Jan 06, 2021 6:37 pm

Re: Zoneminder crashing after updates

Post by huquad » Thu Jan 07, 2021 3:31 pm

I don't understand your reply. Can you elaborate?

Magic919
Posts: 409
Joined: Wed Sep 18, 2013 6:56 am

Re: Zoneminder crashing after updates

Post by Magic919 » Thu Jan 07, 2021 3:42 pm

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.

huquad
Posts: 3
Joined: Wed Jan 06, 2021 6:37 pm

Re: Zoneminder crashing after updates

Post by huquad » Thu Jan 07, 2021 4:29 pm

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.

Magic919
Posts: 409
Joined: Wed Sep 18, 2013 6:56 am

Re: Zoneminder crashing after updates

Post by Magic919 » Thu Jan 07, 2021 4:55 pm

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.

User avatar
bkjaya1952
Posts: 150
Joined: Sat Aug 25, 2018 3:24 pm
Location: Sri Lanka
Contact:

Re: Zoneminder crashing after updates

Post by bkjaya1952 » Wed Jan 13, 2021 12:16 pm

Try and see the following docker zoneminder .

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest