[support] dlandon - Zoneminder 1.36


Recommended Posts

Hi,

Zoneminder is running in a docker container within Unraid.

System specs:
M/B: ASRock Z270 Gaming-ITX/ac
BIOS: American Megatrends Inc. Version P2.50. Dated: 02/26/2018
CPU: Intel® Core™ i5-7400 CPU @ 3.00GHz
HVM: Enabled
IOMMU: Enabled
Cache: 256 KiB, 1 MB, 6 MB
Memory: 16 GiB DDR4 (max. installable capacity 32 GiB)

I've set up an external trigger within Home Assistant to trigger recording in Zoneminder.
Basically, it changes the state of my monitor from 'monitor' to 'record'.

After testing, it works flawlessly, however, even when I manually change the state of my monitor back from 'record' to 'monitor', the event still has no end time, meaning that Zoneminder still thinks it's recording.

This still persists even if I stop the docker and start it again. Events are ONLY closed if I completely reboot Unraid.

What am I doing wrong? And how can I fix this?

Edit: I'm getting desperate. Nobody can tell me what the issue is or how to fix it. I will pay REAL MONEY to anyone who helps me fix this problem. I'm deadly serious. No other project I've worked on has made me feel this defeated.

Screenshot 2021-07-02 103536.jpg

Link to comment
10 hours ago, Corvus said:

Hi,

Zoneminder is running in a docker container within Unraid.

System specs:
M/B: ASRock Z270 Gaming-ITX/ac
BIOS: American Megatrends Inc. Version P2.50. Dated: 02/26/2018
CPU: Intel® Core™ i5-7400 CPU @ 3.00GHz
HVM: Enabled
IOMMU: Enabled
Cache: 256 KiB, 1 MB, 6 MB
Memory: 16 GiB DDR4 (max. installable capacity 32 GiB)

I've set up an external trigger within Home Assistant to trigger recording in Zoneminder.
Basically, it changes the state of my monitor from 'monitor' to 'record'.

After testing, it works flawlessly, however, even when I manually change the state of my monitor back from 'record' to 'monitor', the event still has no end time, meaning that Zoneminder still thinks it's recording.

This still persists even if I stop the docker and start it again. Events are ONLY closed if I completely reboot Unraid.

What am I doing wrong? And how can I fix this?

Edit: I'm getting desperate. Nobody can tell me what the issue is or how to fix it. I will pay REAL MONEY to anyone who helps me fix this problem. I'm deadly serious. No other project I've worked on has made me feel this defeated.

Screenshot 2021-07-02 103536.jpg

I'm no expert on external triggers, but given that restarting the ZM docker DOESN'T fix the issue, and restarting the whole server DOES, which presumably restarts whatever is creating/starting the trigger, I would look more in depth at how/what is starting the trigger, it may not be 'stopping' appropriately or otherwise causing a conflict.  My 2 cents, other opinions are available.

Link to comment
26 minutes ago, ThreeFN said:

I'm no expert on external triggers, but given that restarting the ZM docker DOESN'T fix the issue, and restarting the whole server DOES, which presumably restarts whatever is creating/starting the trigger, I would look more in depth at how/what is starting the trigger, it may not be 'stopping' appropriately or otherwise causing a conflict.  My 2 cents, other opinions are available.

That would make sense if (as I said) it wasn't ALSO doing it when I manually switch the camera from 'monitor' to 'record' and then back to 'monitor' again, with no external triggers involved, or even running.

This means external triggers are not the issue.

Any other ideas?

Edited by Corvus
clarity
Link to comment
On 7/13/2021 at 6:33 PM, Corvus said:

That would make sense if (as I said) it wasn't ALSO doing it when I manually switch the camera from 'monitor' to 'record' and then back to 'monitor' again, with no external triggers involved, or even running.

This means external triggers are not the issue.

Any other ideas?

I encountered new problems upgrading ZM from 1.34 to 1.36 : events wouldn't record because of buffers issues (see settings in Source > Buffers) or they would start but then fill up RAM in seconds.
Turned out to be from my IP cameras which have a setting "Smart Codec" that had to be turned off to let ZM record correctly (to get iframes). source : https://forums.zoneminder.com/viewtopic.php?f=42&t=30481#p120107
Maybe check on your camera

Link to comment
11 hours ago, kceles said:

Turned out to be from my IP cameras which have a setting "Smart Codec" that had to be turned off to let ZM record correctly (to get iframes). source : https://forums.zoneminder.com/viewtopic.php?f=42&t=30481#p120107
Maybe check on your camera


The only options my camera has is H265 and H265+.
It's currently set on H265, and the iframe interval is 15, which is equal to my frame rate.

Any other ideas?

Link to comment

Hello,

I keep having the same issue with the SQL database.

I have deleted everything and started over from scratch 3 times and each time after a week of so Zoneminder fails to load and I get these warnings.

 

DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jul 22 12:47:00 853d22092257 zmupdate[1125]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 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.
Jul 22 12:47:00 853d22092257 zmupdate[1125]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jul 22 12:47:00 853d22092257 zmupdate[1127]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 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.
Jul 22 12:47:00 853d22092257 zmupdate[1127]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
Starting ZoneMinder:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jul 22 12:47:00 853d22092257 zmpkg[1137]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 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/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.
Jul 22 12:47:00 853d22092257 zmpkg[1137]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
ZoneMinder failed to start

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

*** Killing all processes...
Jul 22 12:47:00 853d22092257 syslog-ng[20]: syslog-ng shutting down; version='3.25.1'

 

I have no problem removing everything and starting over but something that I am doing must be wrong to get the same issue every time.

Please help.

Chas

tower-diagnostics-20210722-1250.zip

Link to comment
5 minutes ago, kysdaddy said:

Hello,

I keep having the same issue with the SQL database.

I have deleted everything and started over from scratch 3 times and each time after a week of so Zoneminder fails to load and I get these warnings.

 

DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jul 22 12:47:00 853d22092257 zmupdate[1125]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 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.
Jul 22 12:47:00 853d22092257 zmupdate[1125]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 74.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jul 22 12:47:00 853d22092257 zmupdate[1127]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 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.
Jul 22 12:47:00 853d22092257 zmupdate[1127]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
Starting ZoneMinder:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Jul 22 12:47:00 853d22092257 zmpkg[1137]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 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/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.
Jul 22 12:47:00 853d22092257 zmpkg[1137]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
ZoneMinder failed to start

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

*** Killing all processes...
Jul 22 12:47:00 853d22092257 syslog-ng[20]: syslog-ng shutting down; version='3.25.1'

 

I have no problem removing everything and starting over but something that I am doing must be wrong to get the same issue every time.

Please help.

Chas

tower-diagnostics-20210722-1250.zip 163.85 kB · 0 downloads

When that happens go here and scroll down to the bottom and follow the instructions when you have a container failure.

 

https://github.com/dlandon/zoneminder.machine.learning

 

Let me know if you can get it going using this method.

Link to comment
17 minutes ago, dlandon said:

When that happens go here and scroll down to the bottom and follow the instructions when you have a container failure.

 

https://github.com/dlandon/zoneminder.machine.learning

 

Let me know if you can get it going using this method.

 

 

I am really sorry. I was able to follow the instructions and received this when I tried to start ZM

root@Tower:~# docker exec -it Zoneminder /bin/bash
root@ef02f6c53378:/# service mysql start
 * Starting MariaDB database server mysqld                                                                        [fail] 
root@ef02f6c53378:/# service zoneminder start
Starting ZoneMinder:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
07/22/21 13:18:22.026917 zmpkg[1176].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
07/22/21 13:18:22.027215 zmpkg[1176].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
07/22/21 13:18:22.027685 zmpkg[1176].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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/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.
ZoneMinder failed to start
 

Seems to say the same thing as the ZM warnings and I have no clue what to do next....?

 

Thanks for any help

 

Chas

Link to comment
42 minutes ago, kysdaddy said:

 

 

I am really sorry. I was able to follow the instructions and received this when I tried to start ZM

root@Tower:~# docker exec -it Zoneminder /bin/bash
root@ef02f6c53378:/# service mysql start
 * Starting MariaDB database server mysqld                                                                        [fail] 
root@ef02f6c53378:/# service zoneminder start
Starting ZoneMinder:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
07/22/21 13:18:22.026917 zmpkg[1176].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
07/22/21 13:18:22.027215 zmpkg[1176].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
07/22/21 13:18:22.027685 zmpkg[1176].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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/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.
ZoneMinder failed to start
 

Seems to say the same thing as the ZM warnings and I have no clue what to do next....?

 

Thanks for any help

 

Chas

That's probably an issue with Zoneminder, and you should use the Zoneminder forum to get help.

Link to comment

@dlandon

 

Howdy.  I'm running your ML build; has been solid but when rebooted it today it's failing to start up now (been running solid for months).

logs:

*** Running /etc/my_init.d/20_apt_update.sh...
Performing updates...
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://ppa.launchpad.net/iconnor/zoneminder-1.36/ubuntu focal InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:5 http://ppa.launchpad.net/ondrej/apache2/ubuntu focal InRelease
Get:6 http://security.ubuntu.com/ubuntu focal-security/universe Sources [84.0 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [785 kB]
Get:8 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease [23.9 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main Sources [528 kB]
Get:11 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 Packages [151 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Sources [21.6 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe Sources [226 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1055 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1423 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [39.1 kB]
Fetched 4665 kB in 2s (2752 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
login passwd
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1019 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 login amd64 1:4.8.1-1ubuntu5.20.04.1 [220 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 passwd amd64 1:4.8.1-1ubuntu5.20.04.1 [799 kB]
Fetched 1019 kB in 1s (897 kB/s)
Preparing to unpack .../login_1%3a4.8.1-1ubuntu5.20.04.1_amd64.deb ...
Unpacking login (1:4.8.1-1ubuntu5.20.04.1) over (1:4.8.1-1ubuntu5.20.04) ...
Preparing to unpack .../passwd_1%3a4.8.1-1ubuntu5.20.04.1_amd64.deb ...
Unpacking passwd (1:4.8.1-1ubuntu5.20.04.1) over (1:4.8.1-1ubuntu5.20.04) ...
Setting up passwd (1:4.8.1-1ubuntu5.20.04.1) ...
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
*** Running /etc/my_init.d/30_gen_ssl_keys.sh...
using existing keys in "/config/keys"
*** Running /etc/my_init.d/40_firstrun.sh...
Using existing conf folder
Copying zm.conf to config folder
mv: cannot stat '/root/zm.conf': No such file or directory
File zmeventnotification.ini already moved
File secrets.ini already moved
File opencv.sh already moved
File debug_opencv.sh already moved
Event notification server already moved
Pushover api already moved
Using existing ssmtp folder
Using existing mysql database folder
Copy /config/control/ scripts to /usr/share/perl5/ZoneMinder/Control/
Copy /config/conf/ scripts to /etc/zm/conf.d/
Creating symbolink links
usermod: no changes
usermod: no changes
usermod: no changes
Using existing data directory for events
Using existing data directory for images
Using existing data directory for temp
Using existing data directory for cache
no crontab for root
File objectconfig.ini already moved
File config_upgrade.py already moved
File zm_event_start.sh already moved
File zm_event_end.sh already moved
File zm_detect.py already moved
File zm_detect_old.py already moved
File zm_train_faces.py already moved
File train_faces.py already moved
Starting services...
* Starting Apache httpd web server apache2
*
* Starting MariaDB database server mysqld
...done.
Aug 2 10:41:12 d1992da2ad0d /etc/mysql/debian-start[1011]: Upgrading MySQL tables if necessary.
Aug 2 10:41:12 d1992da2ad0d /etc/mysql/debian-start[1017]: Looking for 'mysql' as: /usr/bin/mysql
Aug 2 10:41:12 d1992da2ad0d /etc/mysql/debian-start[1017]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Aug 2 10:41:12 d1992da2ad0d /etc/mysql/debian-start[1017]: This installation of MySQL is already upgraded to 10.3.30-MariaDB, use --force if you still need to run mysql_upgrade
Aug 2 10:41:12 d1992da2ad0d /etc/mysql/debian-start[1024]: Checking for insecure root accounts.
Aug 2 10:41:12 d1992da2ad0d /etc/mysql/debian-start[1028]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables

Database already at version 1.36.5, update skipped.


Freshening configuration in database
Migratings passwords, if any...
Loading config from DB 221 entries
Saving config to DB 221 entries
Starting ZoneMinder:
Aug 2 10:41:12 d1992da2ad0d zmpkg[1070]: INF [Sanity checking States table...]
DBD::mysql::st execute failed: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Logger.pm line 627.
DBD::mysql::st execute failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/bin/zmpkg.pl line 325.
Aug 2 10:41:12 d1992da2ad0d zmpkg[1070]: ERR [Can't execute log entry 'INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, NULL )': Lost connection to MySQL server during query]
Aug 2 10:41:12 d1992da2ad0d zmpkg[1070]: FAT [Can't execute: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)]
ZoneMinder failed to start

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

*** Killing all processes...

 

Link to comment

I've added a section in the first post that will help with troubleshooting issues with the docker container failing to start.  Read the section 'Troubleshooting when the container fails' and give that a try.  Additional help is available on the Zoneminder forums.

Link to comment
  • 4 weeks later...

So this is wild...

 

I had been running this for awhile without issues and I've had a non docker instance running on a dedicated machine before this. Zoneminder was writing to cache but it looks like mover had issues moving the files from cache to array. I turned off ZM and allowed mover to move everything and then set use cache : no. Maybe this issue has been since then but not certain.

 

2x Xeon 2630L V3 (7C+14T pinned to ZM)

40GB DDR4

3x 4TB SAS drives + Parity

1TB NVME Cache

 

All cameras (7) are configured for record only and total 3.5MB/s.

 

After an hour or 2 I go from about 6GB baseline RAM usage to 100% and the system binds up so hard that I can't even access the server's BMC to kill it and have to smother via the power button. It doesn't seem to happen gradually though either. At startup it's fine but seems like I leave for a few minutes and it's locked up. ZM Logs don't seem very helpful either.

 

8/28/2021 12:13	zmdc		1000	WAR	'zmc -m 5' has not stopped at 21/08/28 12:13:57 after 10 seconds. Sending KILL to pid 1097	zmdc.pl	'-
8/28/2021 12:13	zmdc		1000	INF	'zmc -m 5' sending stop to pid 1097 at 21/08/28 12:13:57	zmdc.pl	'-
8/28/2021 12:13	zmwatch		1121	INF	Restarting analysis daemon for 5 BackYardSouth	zmwatch.pl	'-
8/28/2021 12:13	zmwatch		1121	WAR	Analysis daemon for 5 BackYardSouth needs restarting, time since last analysis 58 seconds (1630170837-1630170779)	zmwatch.pl	'-
8/28/2021 12:13	zmdc		1000	WAR	'zmc -m 4' has not stopped at 21/08/28 12:13:57 after 10 seconds. Sending KILL to pid 1092	zmdc.pl	'-
8/28/2021 12:13	zmdc		1000	INF	'zmc -m 4' sending stop to pid 1092 at 21/08/28 12:13:57	zmdc.pl	'-
8/28/2021 12:13	zmwatch		1121	INF	Restarting analysis daemon for 4 BackYardNorth	zmwatch.pl	'-
8/28/2021 12:13	zmwatch		1121	WAR	Analysis daemon for 4 BackYardNorth needs restarting, time since last analysis 59 seconds (1630170837-1630170778)	zmwatch.pl	'-
8/28/2021 12:13	zmdc		1000	WAR	'zmc -m 5' has not stopped at 21/08/28 12:13:57 after 10 seconds. Sending KILL to pid 1097	zmdc.pl	'-
8/28/2021 12:13	zmdc		1000	WAR	'zmc -m 2' has not stopped at 21/08/28 12:13:57 after 10 seconds. Sending KILL to pid 1068	zmdc.pl	'-
8/28/2021 12:13	zmdc		1000	WAR	'zmc -m 4' has not stopped at 21/08/28 12:13:57 after 10 seconds. Sending KILL to pid 1092	zmdc.pl	'-
8/28/2021 12:13	zmdc		1000	INF	'zmc -m 2' sending stop to pid 1068 at 21/08/28 12:13:57	zmdc.pl	'-
8/28/2021 12:13	zmwatch		1121	INF	Restarting analysis daemon for 2 FrontNorth	zmwatch.pl	'-
8/28/2021 12:13	zmwatch		1121	WAR	Analysis daemon for 2 FrontNorth needs restarting, time since last analysis 56 seconds (1630170836-1630170780)	zmwatch.pl	'-
8/28/2021 12:13	zmdc		1000	INF	'zmc -m 1' sending stop to pid 1064 at 21/08/28 12:13:56	zmdc.pl	'-
8/28/2021 12:13	zmwatch		1121	INF	Restarting analysis daemon for 1 FrontSouth	zmwatch.pl	'-
8/28/2021 12:13	zmwatch		1121	WAR	Analysis daemon for 1 FrontSouth needs restarting, time since last analysis 51 seconds (1630170836-1630170785)	zmwatch.pl	'-
8/28/2021 12:13	zmc_m6		1102	INF	BabyCam: 1800 - Capturing at 4.00 fps, capturing bandwidth 65690bytes/sec	zm_monitor.cpp	1663
8/28/2021 12:13	zmdc		1000	INF	'zmc -m 5' sending stop to pid 1097 at 21/08/28 12:13:46	zmdc.pl	'-
8/28/2021 12:13	zmc_m7		1107	INF	Laview: 1800 - Capturing at 4.00 fps, capturing bandwidth 111802bytes/sec	zm_monitor.cpp	1663
8/28/2021 12:13	zmwatch		1121	INF	Restarting analysis daemon for 5 BackYardSouth	zmwatch.pl	'-
8/28/2021 12:13	zmwatch		1121	WAR	Analysis daemon for 5 BackYardSouth needs restarting, time since last analysis 47 seconds (1630170826-1630170779)	zmwatch.pl	'-
8/28/2021 12:13	zmdc		1000	INF	'zmc -m 4' sending stop to pid 1092 at 21/08/28 12:13:46	zmdc.pl	'-
8/28/2021 12:13	zmwatch		1121	INF	Restarting analysis daemon for 4 BackYardNorth	zmwatch.pl	'-
8/28/2021 12:13	zmwatch		1121	WAR	Analysis daemon for 4 BackYardNorth needs restarting, time since last analysis 48 seconds (1630170826-1630170778)	zmwatch.pl	'-
8/28/2021 12:13	zmdc		1000	INF	'zmc -m 2' sending stop to pid 1068 at 21/08/28 12:13:46	zmdc.pl	'-
8/28/2021 12:13	zmwatch		1121	INF	Restarting analysis daemon for 2 FrontNorth	zmwatch.pl	'-
8/28/2021 12:13	zmwatch		1121	WAR	Analysis daemon for 2 FrontNorth needs restarting, time since last analysis 46 seconds (1630170826-1630170780)	zmwatch.pl	'-
8/28/2021 12:13	zmc_m2		1068	INF	FrontNorth: 1800 - Capturing at 4.00 fps, capturing bandwidth 805629bytes/sec	zm_monitor.cpp	1663
8/28/2021 12:13	zmc_m3		1072	INF	SideYard: 1800 - Capturing at 4.00 fps, capturing bandwidth 512321bytes/sec	zm_monitor.cpp	1663
8/28/2021 12:13	zmc_m4		1092	INF	BackYardNorth: 1500 - Capturing at 3.39 fps, capturing bandwidth 765902bytes/sec	zm_monitor.cpp	1663
8/28/2021 12:13	zmc_m1		1064	INF	FrontSouth: 1500 - Capturing at 3.35 fps, capturing bandwidth 768390bytes/sec	zm_monitor.cpp	1663
8/28/2021 12:13	zmc_m6		1102	INF	BabyCam: 1700 - Capturing at 4.00 fps, capturing bandwidth 56713bytes/sec	zm_monitor.cpp	1663
8/28/2021 12:13	zmc_m7		1107	INF	Laview: 1700 - Capturing at 4.00 fps, capturing bandwidth 130066bytes/sec	zm_monitor.cpp	1663

 

HTOP offers the biggest clue. The last time every core was 100% utilized.

image.png.7f4ce171ffd727c13457f4d49c567947.png

 

At one point I was able to get into the web interface long enough to see the Unraid log. Looks like it just freaked out because there was no useable RAM.

 

Any Suggestions?

Link to comment
21 hours ago, BlackAndChrome said:

Zoneminder was writing to cache but it looks like mover had issues moving the files from cache to array.

You shouldn't put Zoneminder files where the mover will move them.  Stop Zoneminder, set the share to cache prefer, run the mover and the files will be moved from the array disks to the cache.  Edit Zonemnder and confirm you have shared memory 'SHM' set to 50%, verify your 'data' path is set properly for a valid and not defaulting to memory.  Restart Zoneminder.

Link to comment
On 8/29/2021 at 10:28 AM, dlandon said:

You shouldn't put Zoneminder files where the mover will move them.  Stop Zoneminder, set the share to cache prefer, run the mover and the files will be moved from the array disks to the cache.  Edit Zonemnder and confirm you have shared memory 'SHM' set to 50%, verify your 'data' path is set properly for a valid and not defaulting to memory.  Restart Zoneminder.

That's what I did to move the Zoneminder share from cache to array, it's been running from the array since so this issue is while writing to array.

 

SHM in the config was still set as default 5G, I assume it should have just stopped at that point? Even at 5G the base usage was pretty low since I don't have much in regards to buffers while running in simple "record" mode.

The data path is set correctly, it is still writing to the Zonemidner share, just on the array now. I originally wondered if zoneminder was outpacing my disks somehow but the data rate is quite low, and I haven't seen any other indication of intermittent disk write issues.

 

Thanks,

-Nick

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.