[support] dlandon - Zoneminder 1.36


1113 posts in this topic Last Reply

Recommended Posts

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I realize that Zoneminder 1.32.0 has been released and I will eventually update the Docker for this new release.  Please don't try to lobby me to update the Docker right away.  I won't update it for a

This is an update of the Zoneminder Docker initially created by aptalca to the latest version of Zoneminder.  You can do an in place update of this Docker and your current configuration will be kept a

Map an external port to the Zoneminder docker port 80.

Posted Images

1 hour ago, Jokerigno said:

Hi all, does anyone knows if it is possible to use swag to generate a trusted certificate for ZM avoid warning messages when open ui?

Yes.  Not sure if this is best practice, but here's what I have configured and working:

1. You need to own your own domain so you can assign zoneminder.YOURDOMAIN.ETC

2. Also I have both SWAG and ZM on a separate bridged network per spaceinvanderone's video(s) (along with other stuff).

3. Assign a wildcard cert to yourself so you don't need more than one cert.

4. Point zoneminder's cert folder contents to your swag certs as below:

image.thumb.png.50ab506fafff7a08f5a04165ee13dd8f.png

5. Make sure you setup as read only on both, just in case

image.thumb.png.ca59ce6a8726b719de8468b6a34ad021.png

 

So far this works fine for me and doesn't seem to have any serious security faux pas.

 

I'm pretty sure if your using a duckdns style setup that this will work with your subdomain only cert setup because ZM uses a subfolder, but I haven't used/setup that sort of config.  Obviously this only covers ZM getting the cert and not swag rev proxy, for that I used the following for my subdomain config, which is basically the default subdomain config:

 

zoneminder.subdomain.conf

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name zoneminder.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    # include /config/nginx/ldap.conf;

    # enable for Authelia
    # include /config/nginx/authelia-server.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /ldaplogin;

        # enable for Authelia
        # include /config/nginx/authelia-location.conf;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app zoneminder;
        set $upstream_port 443;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        # REMOVE THIS LINE BEFORE SUBMITTING: Additional proxy settings such as headers go below this line, leave the blank line above.
    }
}

 

Link to post
Posted (edited)

There is an new docker available that is upgraded to Ubuntu 20.04 (for better hardware support), and ES 6.1.0.  These changes should resolve some outstanding issues with ES.  I've also made a change to how shm is configured.  I pushed a new docker xml that has the a different way of setting shm  memory.  Your existing docker xml will continue to work fine though.

Edited by dlandon
Link to post

Because of the change in how shared memory is set up, you will need to use the new Zoneminder template:;,  Do this procedure:

- Remove the docker image.  All your data and settings will be kept.

- Click on add a container and delete the Zoneminder template.

- Go to he apps and get the new template.  Read about adjusting shared memory and be sure to increase until you get to less than 50% on the Zoneminder console.

Link to post

Thanks, the ES is working again for me.

 

I have never adjusted shared memory before so will have to read about that, currently it reports 16% with the 5G default from the template, my server has total 32GB installed.

Link to post

When the docker was originally authored, the SHMEM=50% was somewhat arbitrary, but pretty much guaranteed that Zoneminder got enough shared memory.  You just now have to tweak it to be sure there is enough.

 

All Zoneminder needs is 50% or below utilization to be sure it has enough.

Link to post
2 minutes ago, fireplex said:

Excellent thanks.

 

So I presume the 5G just sets the highest amount of memory it can allocate from my total of 32GB, to stop it overwhelming the whole system.

Yes, 5G is the fixed size the docker allocates to a mount called /dev/shm when the docker starts.  Yes, it comes from the total installed memory.  Each system and configuration of cameras will be different for each Zoneminder installation.  The 5G I set in the template is just a good starting point.

Link to post
7 hours ago, dlandon said:

There is an new docker available that is upgraded to Ubuntu 20.04 (for better hardware support), and ES 6.1.0.  These changes should resolve some outstanding issues with ES.  I've also made a change to how shm is configured.  I pushed a new docker xml that has the a different way of setting shm  memory.  Your existing docker xml will continue to work fine though.

AMAZING! and ffmpeg shows cuvid and cuda for `-hwaccels` 
Heroic work! Happy New Year :) 

Link to post
On 1/1/2021 at 6:05 PM, ThreeFN said:

Yes.  Not sure if this is best practice, but here's what I have configured and working:

1. You need to own your own domain so you can assign zoneminder.YOURDOMAIN.ETC

2. Also I have both SWAG and ZM on a separate bridged network per spaceinvanderone's video(s) (along with other stuff).

3. Assign a wildcard cert to yourself so you don't need more than one cert.

4. Point zoneminder's cert folder contents to your swag certs as below:

image.thumb.png.50ab506fafff7a08f5a04165ee13dd8f.png

5. Make sure you setup as read only on both, just in case

image.thumb.png.ca59ce6a8726b719de8468b6a34ad021.png

 

So far this works fine for me and doesn't seem to have any serious security faux pas.

 

I'm pretty sure if your using a duckdns style setup that this will work with your subdomain only cert setup because ZM uses a subfolder, but I haven't used/setup that sort of config.  Obviously this only covers ZM getting the cert and not swag rev proxy, for that I used the following for my subdomain config, which is basically the default subdomain config:

 

zoneminder.subdomain.conf


server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name zoneminder.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    # include /config/nginx/ldap.conf;

    # enable for Authelia
    # include /config/nginx/authelia-server.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /ldaplogin;

        # enable for Authelia
        # include /config/nginx/authelia-location.conf;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app zoneminder;
        set $upstream_port 443;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        # REMOVE THIS LINE BEFORE SUBMITTING: Additional proxy settings such as headers go below this line, leave the blank line above.
    }
}

 

So you are exposing ZM to the world right? Because even if it can be secured with psw I prefer to have access only in LAN. 

Link to post

I did like @dlandon told. But I got those Errors:

 

Starting services...
* Starting Apache httpd web server apache2
*
* Starting MariaDB database server mysqld
...fail!
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.

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.

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 3 15:42:12 b4d1af27556f zmupdate[1008]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]

Jan 3 15:42:12 b4d1af27556f zmupdate[1008]: ERR [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.

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.

Jan 3 15:42:12 b4d1af27556f zmupdate[1010]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.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 3 15:42:12 b4d1af27556f zmupdate[1010]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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' (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.

Jan 3 15:42:12 b4d1af27556f zmpkg[1020]: ERR [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.

Jan 3 15:42:12 b4d1af27556f zmpkg[1020]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.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/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


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


*** Killing all processes...
Jan 3 15:42:12 b4d1af27556f syslog-ng[19]: syslog-ng shutting down; version='3.25.1'

Anybodys know, what I did wrong? Sometimes I dont see the one tree in front of the whole forest... Thanks!

Link to post

Did I miss a memo? Updated Zoneminder container today and it's ALL broke. Won't run at all? Well, it runs, but wont capture footage or playback etc.

 

Jan 3 09:59:48 ced98c4eec49 web_php[1145]: ERR [getStreamCmdResponse stream error: Socket /run/zm/zms-533979s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()]
Jan 3 10:01:46 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:01:46, pid = 1397]
Jan 3 10:01:46 ced98c4eec49 zmdc[1397]: INF ['zmc -m 1' started at 21/01/03 10:01:46]
Jan 3 10:01:46 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:01:47 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:01:47 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:01:47, pid = 1398]
Jan 3 10:01:47 ced98c4eec49 zmdc[1398]: INF ['zma -m 1' started at 21/01/03 10:01:47]
Jan 3 10:01:47 ced98c4eec49 zma_m1[1398]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:01:47 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]
Jan 3 10:01:56 ced98c4eec49 zmdc[873]: INF [Starting pending process, zmc -m 1]
Jan 3 10:01:56 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:01:56, pid = 1399]
Jan 3 10:01:56 ced98c4eec49 zmdc[1399]: INF ['zmc -m 1' started at 21/01/03 10:01:56]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:01:57, pid = 1400]
Jan 3 10:01:57 ced98c4eec49 zmdc[1400]: INF ['zma -m 1' started at 21/01/03 10:01:57]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:01:57 ced98c4eec49 zma_m1[1400]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF [Starting pending process, zmc -m 1]
Jan 3 10:02:17 ced98c4eec49 zmdc[1403]: INF ['zmc -m 1' started at 21/01/03 10:02:17]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:02:17, pid = 1403]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:02:17, pid = 1404]
Jan 3 10:02:17 ced98c4eec49 zmdc[1404]: INF ['zma -m 1' started at 21/01/03 10:02:17]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:02:17 ced98c4eec49 zma_m1[1404]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF [Starting pending process, zmc -m 1]
Jan 3 10:02:57 ced98c4eec49 zmdc[1407]: INF ['zmc -m 1' started at 21/01/03 10:02:57]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:02:57, pid = 1407]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:02:57, pid = 1408]
Jan 3 10:02:57 ced98c4eec49 zmdc[1408]: INF ['zma -m 1' started at 21/01/03 10:02:57]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:02:57 ced98c4eec49 zma_m1[1408]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]

dev/shm:100%

 

Any ideas here? :scratches head:

Link to post
2 minutes ago, blaine07 said:

Did I miss a memo? Updated Zoneminder container today and it's ALL broke. Won't run at all? Well, it runs, but wont capture footage or playback etc.

 


Jan 3 09:59:48 ced98c4eec49 web_php[1145]: ERR [getStreamCmdResponse stream error: Socket /run/zm/zms-533979s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()]

Jan 3 10:01:46 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:01:46, pid = 1397]
Jan 3 10:01:46 ced98c4eec49 zmdc[1397]: INF ['zmc -m 1' started at 21/01/03 10:01:46]
Jan 3 10:01:46 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:01:47 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:01:47 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:01:47, pid = 1398]
Jan 3 10:01:47 ced98c4eec49 zmdc[1398]: INF ['zma -m 1' started at 21/01/03 10:01:47]
Jan 3 10:01:47 ced98c4eec49 zma_m1[1398]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:01:47 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]
Jan 3 10:01:56 ced98c4eec49 zmdc[873]: INF [Starting pending process, zmc -m 1]
Jan 3 10:01:56 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:01:56, pid = 1399]
Jan 3 10:01:56 ced98c4eec49 zmdc[1399]: INF ['zmc -m 1' started at 21/01/03 10:01:56]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:01:57, pid = 1400]
Jan 3 10:01:57 ced98c4eec49 zmdc[1400]: INF ['zma -m 1' started at 21/01/03 10:01:57]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:01:57 ced98c4eec49 zma_m1[1400]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:01:57 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF [Starting pending process, zmc -m 1]
Jan 3 10:02:17 ced98c4eec49 zmdc[1403]: INF ['zmc -m 1' started at 21/01/03 10:02:17]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:02:17, pid = 1403]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:02:17, pid = 1404]
Jan 3 10:02:17 ced98c4eec49 zmdc[1404]: INF ['zma -m 1' started at 21/01/03 10:02:17]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:02:17 ced98c4eec49 zma_m1[1404]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:02:17 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF [Starting pending process, zmc -m 1]
Jan 3 10:02:57 ced98c4eec49 zmdc[1407]: INF ['zmc -m 1' started at 21/01/03 10:02:57]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' starting at 21/01/03 10:02:57, pid = 1407]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF [Starting pending process, zma -m 1]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF ['zma -m 1' starting at 21/01/03 10:02:57, pid = 1408]
Jan 3 10:02:57 ced98c4eec49 zmdc[1408]: INF ['zma -m 1' started at 21/01/03 10:02:57]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: INF ['zmc -m 1' crashed, signal 6]
Jan 3 10:02:57 ced98c4eec49 zma_m1[1408]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor LIVING ROOM]
Jan 3 10:02:57 ced98c4eec49 zmdc[873]: ERR ['zma -m 1' exited abnormally, exit status 255]

dev/shm:100%

 

Any ideas here? :scratches head:

 

Link to post
1 hour ago, hundsboog said:

I did like @dlandon told. But I got those Errors:

 


Starting services...
* Starting Apache httpd web server apache2
*
* Starting MariaDB database server mysqld
...fail!
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.

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.

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 3 15:42:12 b4d1af27556f zmupdate[1008]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]

Jan 3 15:42:12 b4d1af27556f zmupdate[1008]: ERR [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.

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.

Jan 3 15:42:12 b4d1af27556f zmupdate[1010]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.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 3 15:42:12 b4d1af27556f zmupdate[1010]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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' (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.

Jan 3 15:42:12 b4d1af27556f zmpkg[1020]: ERR [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.

Jan 3 15:42:12 b4d1af27556f zmpkg[1020]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.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/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


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


*** Killing all processes...
Jan 3 15:42:12 b4d1af27556f syslog-ng[19]: syslog-ng shutting down; version='3.25.1'

Anybodys know, what I did wrong? Sometimes I dont see the one tree in front of the whole forest... Thanks!

Add more shm-size to see if it will get going.  Add half of your available memory to start and then adjust to get closer to 50% /dev/shm on the Zoneminder console.

Link to post
10 minutes ago, dlandon said:

 

Im sorry mate; I hate to be that fkn tard LOL sigh. I got it booted and seemed to kind of work. Memory was 100% so going to have to tweak that a bit. Went to 10G and going from there. 

 

My apologies and thank you so much for all your hard work into this!

Link to post

I had this issue last night after my dockers upgraded automatically. There is a message a day ago that said the parameter SHMEM=50% has been removed and replaced with an argument --shm-size="5G",  also in the submit comments on github. 

 

I removed my docker and re-created it as instructed earlier in this forum but maybe all that needs to be done is to change the arguments in the edit docker screen (advanced view) to replace what is there with --shm-size="5G" (or bigger depending on your memory and requirements).  

 

I started with just over 50% of my memory and reduced it.

 

Hope it helps.

Link to post
7 hours ago, Jokerigno said:

So you are exposing ZM to the world right? Because even if it can be secured with psw I prefer to have access only in LAN. 

Yes, it is exposed to the internet, you have to be exposed in order for zmninja to work 'as intended' getting picture notifications and the like. 

 

I was working on the assumption that you wanted certs because you wanted SSL, https, etc.  I'm pretty sure you can't have a SWAG cert on your LAN because the cert has to be for a domain (eg yourdomain.url), and said domain has to be authenticated from an external source (ie cloudflare server on the net, it has to check you own the domain).  There may be some way to point your router so that swag can authenticate your domain but then you only serve your domain on your LAN, but I haven't played with that sort of config.  You can't have a cert for your LAN IP range eg 192.168.0.0 or 10.0.0.0 etc because they're not domains.

22 hours ago, dlandon said:

Because of the change in how shared memory is set up, you will need to use the new Zoneminder template:;,  Do this procedure:

- Remove the docker image.  All your data and settings will be kept.

- Click on add a container and delete the Zoneminder template.

- Go to he apps and get the new template.  Read about adjusting shared memory and be sure to increase until you get to less than 50% on the Zoneminder console.

dlandon, may I ask the mechanics of the shared memory setting for my edification?  Trying to cross reference my understanding with this FAQ and the memory math wiki.  Is it strictly necessary to tune it so that /dev/shm shows 50% in ZM, or could you tune it to leave 20% (80% used) as recommended in memory math wiki?  Or are there temporary memory execs that you should leave 50% available for?  Or does it really not matter to set it to 50% because any unused memory (the 20/50% that remains) isn't occupied and still available to the system anyways?

 

Cheers mate, appreciate the work yourself and pliablepixels do.

 

Link to post
1 hour ago, ThreeFN said:

Is it strictly necessary to tune it so that /dev/shm shows 50% in ZM

Set it as they recommend.  The 50% and below is just a starting point.

Link to post
5 minutes ago, hbrob said:

I had a similar issue when upgrading.  So, decided to start from scratch.  Got ZM up and was able to compile for my video card, but the event server isnt working,.  Getting this error during the install, and it looks like the .sh files for the ES arent moving correctly, they are showing as symlinks, and as a result wont run (the actual files arent present.

 

 

Capture.PNG

Remove the Zoneminder/appdata/hook/ folder and restart Zoneminer.  The files should be recreated.

Link to post
6 hours ago, hundsboog said:

I did like @dlandon told. But I got those Errors:

 


Starting services...
* Starting Apache httpd web server apache2
*
* Starting MariaDB database server mysqld
...fail!
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.

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.

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 3 15:42:12 b4d1af27556f zmupdate[1008]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]

Jan 3 15:42:12 b4d1af27556f zmupdate[1008]: ERR [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.

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.

Jan 3 15:42:12 b4d1af27556f zmupdate[1010]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.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 3 15:42:12 b4d1af27556f zmupdate[1010]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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' (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.

Jan 3 15:42:12 b4d1af27556f zmpkg[1020]: ERR [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.

Jan 3 15:42:12 b4d1af27556f zmpkg[1020]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.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/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


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


*** Killing all processes...
Jan 3 15:42:12 b4d1af27556f syslog-ng[19]: syslog-ng shutting down; version='3.25.1'

Anybodys know, what I did wrong? Sometimes I dont see the one tree in front of the whole forest... Thanks!

I have same issue here:  deleted app and image, re-installed from community apps. @dlandon any suggestions? I was not running a separate db previously.  My configuration is with GPU enabled hardware.

** edit: i see in previous page to update size of shm - going to make it 10G to see if that works.

Edited by repomanz
shm update
Link to post
11 minutes ago, dlandon said:

Remove the Zoneminder/appdata/hook/ folder and restart Zoneminer.  The files should be recreated.

I had a clean folder when this happened (I started completely from scratch when trying to troubleshoot).

 

Manually adding the files to my hooks folder from the repo fixed this issue, but hooks still arent working.  When trying to run this manually from the command line, I get "sudo: /var/lib/zmeventnotification/bin/zm_event_start.sh: command not found'

 

At this point, I would like to just roll back to the previoys 18.04 version ( I still have my files from that install).  Is there a way to do this so I can get it going again?  Was working fine under my old install.  I dont see any tags on your docker repo.

 

Link to post
8 minutes ago, hbrob said:

I had a clean folder when this happened (I started completely from scratch when trying to troubleshoot).

 

Manually adding the files to my hooks folder from the repo fixed this issue, but hooks still arent working.  When trying to run this manually from the command line, I get "sudo: /var/lib/zmeventnotification/bin/zm_event_start.sh: command not found'

 

At this point, I would like to just roll back to the previoys 18.04 version ( I still have my files from that install).  Is there a way to do this so I can get it going again?  Was working fine under my old install.  I dont see any tags on your docker repo.

 

Look at the Zoneminder log and see if there is a message about the ES bundle can't be downloaded.

 

Just tried it her and it worked for me.

Link to post
14 minutes ago, repomanz said:

I have same issue here:  deleted app and image, re-installed from community apps. @dlandon any suggestions? I was not running a separate db previously.  My configuration is with GPU enabled hardware.

** edit: i see in previous page to update size of shm - going to make it 10G to see if that works.

The previous shm size was half your installed memory.  Start there and adjust.

Link to post
11 minutes ago, dlandon said:

The previous shm size was half your installed memory.  Start there and adjust.

HI @dlandon Thank you.  I tried that and still having issues with mariadb starting.  I have 32gb installed and even with shm set at 24G (75%) I still get the error starting up db.  Other suggestions?

I did notice this however:

 

Starting services...
* Starting Apache httpd web server apache2
*
* Starting MariaDB database server mysqld
* Starting MariaDB database server mysqld
Jan 3 15:54:29 2640f3f29b3b web_php[623]: FAT [Failed db connection to ]

mariadb starting up twice?

Edited by repomanz
Link to post
  • dlandon changed the title to [support] dlandon - Zoneminder 1.36

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.