[support] dlandon - Zoneminder 1.36


Recommended Posts

7 minutes ago, dlandon said:

Why do you need to run the cron?  What does it do?

It changes the running state of zoneminder. Zoneminder allows for the saving of multiple running states, for the purpose of having different cameras running at different times of day. Myself, I would use it to set all my cameras on motion detection at like 9pm daily, and change it to motion detection for only cameras in the front of my house during the day while the dogs are in the backyard. But whats also nice is it would allow any script run in unraid to manipulate the running state of zoneminder automatically just by calling the zmpkg.pl file and naming the running state. Like a security system on a raspberry pi, or something like that. 

Link to comment
28 minutes ago, BilboT34Baggins said:

It changes the running state of zoneminder. Zoneminder allows for the saving of multiple running states, for the purpose of having different cameras running at different times of day. Myself, I would use it to set all my cameras on motion detection at like 9pm daily, and change it to motion detection for only cameras in the front of my house during the day while the dogs are in the backyard. But whats also nice is it would allow any script run in unraid to manipulate the running state of zoneminder automatically just by calling the zmpkg.pl file and naming the running state. Like a security system on a raspberry pi, or something like that. 

Can you point me to some documentation on this feature?

Link to comment
2 hours ago, dlandon said:

Ok.  I found documentation on how to set up run states.  I'll have to ponder how to do the cron to enable the run states in the Docker.

You are seriously awesome, i really appreciate you being so responsive. Let me know if there is some fancy way to run that script straight from unraid without you modifying the docker image. 

Edited by BilboT34Baggins
Link to comment
19 hours ago, BilboT34Baggins said:

Let me know if there is some fancy way to run that script straight from unraid without you modifying the docker image. 

Updated Docker will now create your crontab entries.  Read the first post on how to create a 'cron' file and have the Docker create your crontab entries when it starts.

Link to comment
9 hours ago, dlandon said:

Updated Docker will now create your crontab entries.  Read the first post on how to create a 'cron' file and have the Docker create your crontab entries when it starts.

Tried to test it out tonight and realized the docker didn't get an update. Did you mean this will be part of the next regular update of the docker? Or am I just confused...

Link to comment
  • 2 weeks later...

I just installed this and a bit of a newb with it but I cant seem to get it to run.

 

I keep getting this error when i add a RTSP source:

 

Memory map file '/dev/shm/zm.mmap.2' does not exist. zmc might not be running.

 

 

I can view the source in VLC and it plays fine so I dont think that is the issue:

 

rtsp://192.168.254.76:8554/unicast

 

image.png.a25c921ecfed5852d5b382bcd57beaed.png

 

Updated the settings and now i get these errors:

 

image.thumb.png.8195ce545837d0ac75d021536760549f.png

 

 

Edited by RAINMAN
Link to comment
27 minutes ago, RAINMAN said:

I just installed this and a bit of a newb with it but I cant seem to get it to run.

 

I keep getting this error when i add a RTSP source:

 

Memory map file '/dev/shm/zm.mmap.2' does not exist. zmc might not be running.

 

 

I can view the source in VLC and it plays fine so I dont think that is the issue:

 

rtsp://192.168.254.76:8554/unicast

 

image.png.a25c921ecfed5852d5b382bcd57beaed.png

 

Updated the settings and now i get these errors:

 

image.thumb.png.8195ce545837d0ac75d021536760549f.pngimageproxy.php?img=&key=00b562fcac28e727

 

 

Looks like a memory issue.  I'd take this to the Zoneminder forum.  The link is in the first post.

Link to comment
  • 2 weeks later...

I am completely new to unraid so sorry for the noob questions but I am struggling to get Zoneminder started.  When I go to start the Zoneminder docker it will seem like it will start but then stop after awhile.  I assume this is because it was failing so I looked at the log which is below.  Can someone point me in the right direction as to what I am doing wrong.  It looks like I need to set up apache and maybe MySQL but I am not really sure how to do that in unRAID.

 

Mar 7 22:53:42 8cadcc7b1eda syslog-ng[14]: syslog-ng starting up; version='3.5.6'
Mar 7 22:53:43 8cadcc7b1eda syslog-ng[14]: EOF on control channel, closing connection;
*** Running /etc/my_init.d/20_apt_update.sh...
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 306 kB in 1s (188 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
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...
File zm.conf already exists
Using existing ssmtp configuration
Using existing mysql database
Using existing skins directory
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
no crontab for root
Setting shared memory to : 50% of 16383896 bytes
Starting services
* Starting MariaDB database server mysqld
...fail!
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Config.pm line 91.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 100.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 106.
DBI connect('database=;host=','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Config.pm line 106.
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 129.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 129.
Compilation failed in require at /usr/bin/zmupdate.pl line 71.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 71.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Config.pm line 91.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 100.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 106.
DBI connect('database=;host=','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Config.pm line 106.
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 129.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 129.
Compilation failed in require at /usr/bin/zmupdate.pl line 71.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 71.
* Starting Apache httpd web server apache2
*
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 32 of /etc/apache2/sites-enabled/default-ssl.conf:
SSLCertificateFile: file '/etc/apache2/ssl/zoneminder.crt' does not exist or is empty
Action 'configtest' failed.
The Apache error log may have more information.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Config.pm line 91.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 100.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 106.
DBI connect('database=;host=','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Config.pm line 106.
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 129.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 129.
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 48.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 48.
Starting ZoneMinder: failure

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

 

Link to comment

Hi dlandon,

 

The "fisrtrun.sh" contains some errors.

*** Running /etc/my_init.d/40_firstrun.sh...
File zm.conf already exists
Using existing ssmtp configuration
Using existing mysql database
Using existing skins directory
Creating symbolink links
usermod: no changes
usermod: no changes
usermod: no changes
stat: cannot stat '/config/data': No such file or directory
/etc/my_init.d/40_firstrun.sh: line 87: [: !=: unary operator expected
stat: cannot stat '/config/data': No such file or directory
/etc/my_init.d/40_firstrun.sh: line 93: [: !=: unary operator expected
Using existing data directory for events
Using existing data directory for images
Using existing data directory for temp
Correcting /var/cache/zoneminder ownership...

1-

The "/config/data" directory does not exist. It does not exist because it is not used. I think we use /var/cache/zoneminder" instead. I think we should disable this test.

 

2-

Each time the zoneminder docker is restarted, zoneminder is not ready because it changes the owner of all my records.Indeed, this command:
stat -c '% U:% G' / var / cache / zoneminder
should return "root: www-data" but return "nobody: users".

This command:
chown -R root: www-data / var / cache / zoneminder
positions the right owner and the right group but these are changed after just on "/var/cache/zoneminder" root.
In my case, "/var/cache/zoneminder" is mounted on "surveillance" share and "surveillance" share is not exported.

Link to comment
2 hours ago, Shyrka973 said:

Hi dlandon,

 

The "fisrtrun.sh" contains some errors.


*** Running /etc/my_init.d/40_firstrun.sh...
File zm.conf already exists
Using existing ssmtp configuration
Using existing mysql database
Using existing skins directory
Creating symbolink links
usermod: no changes
usermod: no changes
usermod: no changes
stat: cannot stat '/config/data': No such file or directory
/etc/my_init.d/40_firstrun.sh: line 87: [: !=: unary operator expected
stat: cannot stat '/config/data': No such file or directory
/etc/my_init.d/40_firstrun.sh: line 93: [: !=: unary operator expected
Using existing data directory for events
Using existing data directory for images
Using existing data directory for temp
Correcting /var/cache/zoneminder ownership...

1-

The "/config/data" directory does not exist. It does not exist because it is not used. I think we use /var/cache/zoneminder" instead. I think we should disable this test.

 

2-

Each time the zoneminder docker is restarted, zoneminder is not ready because it changes the owner of all my records.Indeed, this command:
stat -c '% U:% G' / var / cache / zoneminder
should return "root: www-data" but return "nobody: users".

This command:
chown -R root: www-data / var / cache / zoneminder
positions the right owner and the right group but these are changed after just on "/var/cache/zoneminder" root.
In my case, "/var/cache/zoneminder" is mounted on "surveillance" share and "surveillance" share is not exported.

Fixed in the next release.

Link to comment

Hi,

 

A problem:

I'm trying to activate zmeventmonitor in SSL (zmNinja) but unsuccessful on iOS. It works with the Mac version of znNinja.
I installed the certificate manually by sending it to me by email.

In the documentation:

It's very important to ensure the Common Name selected while generating the certificate is the same as the hostname or IP of the server. For example if you plan to access the server as myserver.ddns.net Please make sure you use myserver.ddns.net as the common name. If you are planning to access it via IP, please make sure you use the same IP.

 

My Common Name contains * but should contain tower.localdomain.net

 

What do you think ?

Link to comment
4 hours ago, Shyrka973 said:

Hi,

 

A problem:

I'm trying to activate zmeventmonitor in SSL (zmNinja) but unsuccessful on iOS. It works with the Mac version of znNinja.
I installed the certificate manually by sending it to me by email.

In the documentation:

It's very important to ensure the Common Name selected while generating the certificate is the same as the hostname or IP of the server. For example if you plan to access the server as myserver.ddns.net Please make sure you use myserver.ddns.net as the common name. If you are planning to access it via IP, please make sure you use the same IP.

 

My Common Name contains * but should contain tower.localdomain.net

 

What do you think ?

I don't think the * would be allowed.

Link to comment
  • 2 weeks later...

I've also got the "web_php[9233]: ERR [Cannot write to content dirs('events','images'). Check that these exist and are owned by the web account user]" error...

 

/config <-> /mnt/cache/appdata/Zoneminder
/var/cache/zoneminder <-> /mnt/cache/appdata/Zoneminder/data

 

This is a default install (bar changing the unraid side of things as I don't use /mnt/user/appdata...)

 

From within the docker:

 

oot@03fff72fd46e:/# ls -l /var/cache/zoneminder/

total 0

drwxr-xr-x 2 root www-data 6 Mar 29 18:47 events

drwxr-xr-x 2 root www-data 6 Mar 29 18:47 images

drwxr-xr-x 2 root www-data 6 Mar 29 18:47 temp

 

 

From the docker log...

Mar 29 18:55:04 03fff72fd46e zmwatch[9307]: ERR [Error getting last capture time for Front-Door]

Mar 29 18:55:04 03fff72fd46e zmwatch[9307]: INF [Restarting analysis daemon for Front-Door]
Mar 29 18:55:04 03fff72fd46e zmdc[9262]: INF ['zma -m 1' starting at 18/03/29 18:55:04, pid = 9472]
Mar 29 18:55:04 03fff72fd46e zmdc[9472]: INF ['zma -m 1' started at 18/03/29 18:55:04]
Mar 29 18:55:04 03fff72fd46e zma_m1[9472]: ERR [Can't make events/1: Permission denied]
Mar 29 18:55:04 03fff72fd46e zma_m1[9472]: FAT [Can't symlink '1' to 'Front-Door': Permission denied]
Mar 29 18:55:04 03fff72fd46e zmdc[9262]: ERR ['zma -m 1' exited abnormally, exit status 255]
Mar 29 18:55:07 03fff72fd46e zmeventnotification[9295]: INF [Broadcasting new events to all 0 websocket clients]
Mar 29 18:55:07 03fff72fd46e zmeventnotification[9295]: INF [Broadcasting new events to all 0 websocket clients]
Mar 29 18:55:12 03fff72fd46e zmeventnotification[9295]: INF [Broadcasting new events to all 0 websocket clients]
Mar 29 18:55:13 03fff72fd46e zmc_m1[9365]: INF [Front-Door: 5000 - Capturing at 25.00 fps]

 

 

 

Otherwise it works...!

Link to comment
5 hours ago, Interstellar said:

I've also got the "web_php[9233]: ERR [Cannot write to content dirs('events','images'). Check that these exist and are owned by the web account user]" error...

 

/config <-> /mnt/cache/appdata/Zoneminder
/var/cache/zoneminder <-> /mnt/cache/appdata/Zoneminder/data

 

This is a default install (bar changing the unraid side of things as I don't use /mnt/user/appdata...)

 

From within the docker:

 

oot@03fff72fd46e:/# ls -l /var/cache/zoneminder/

total 0

drwxr-xr-x 2 root www-data 6 Mar 29 18:47 events

drwxr-xr-x 2 root www-data 6 Mar 29 18:47 images

drwxr-xr-x 2 root www-data 6 Mar 29 18:47 temp

 

 

From the docker log...

Mar 29 18:55:04 03fff72fd46e zmwatch[9307]: ERR [Error getting last capture time for Front-Door]

Mar 29 18:55:04 03fff72fd46e zmwatch[9307]: INF [Restarting analysis daemon for Front-Door]
Mar 29 18:55:04 03fff72fd46e zmdc[9262]: INF ['zma -m 1' starting at 18/03/29 18:55:04, pid = 9472]
Mar 29 18:55:04 03fff72fd46e zmdc[9472]: INF ['zma -m 1' started at 18/03/29 18:55:04]
Mar 29 18:55:04 03fff72fd46e zma_m1[9472]: ERR [Can't make events/1: Permission denied]
Mar 29 18:55:04 03fff72fd46e zma_m1[9472]: FAT [Can't symlink '1' to 'Front-Door': Permission denied]
Mar 29 18:55:04 03fff72fd46e zmdc[9262]: ERR ['zma -m 1' exited abnormally, exit status 255]
Mar 29 18:55:07 03fff72fd46e zmeventnotification[9295]: INF [Broadcasting new events to all 0 websocket clients]
Mar 29 18:55:07 03fff72fd46e zmeventnotification[9295]: INF [Broadcasting new events to all 0 websocket clients]
Mar 29 18:55:12 03fff72fd46e zmeventnotification[9295]: INF [Broadcasting new events to all 0 websocket clients]
Mar 29 18:55:13 03fff72fd46e zmc_m1[9365]: INF [Front-Door: 5000 - Capturing at 25.00 fps]

 

 

 

Otherwise it works...!

The Zoneminder Docker is supposed to correct the permissions when it starts.  Restart the docker and see if there isn't a message about correcting permissions.

Link to comment

Hi,

 

Sadly no dice. Creates the events/images/temp folders and then nothing.

 

Restarted it a few times and tried it using the default setup, to an array disk, to the cache disk and finally to my intended out-of-array disk. Nothing works.

 

From the docker side:

 

root@eaf70ed4c604:/var/cache/zoneminder# ls -al

total 0

drwxrwxrwx 5 root www-data 46 Mar 30 09:26 .

drwxr-xr-x 1 root root     70 Mar 14 23:42 ..

drwxr-xr-x 2 root www-data  6 Mar 29 18:44 events

drwxr-xr-x 2 root www-data  6 Mar 29 18:44 images

drwxr-xr-x 2 root www-data  6 Mar 29 18:44 temp

 

From the server side:

 

root@UnRAID:/mnt/disks/CCTV1/Front_Door# ls -al

total 0

drwxrwxrwx 5 root sshd 46 Mar 30 09:26 ./

drwxrwxrwx 3 root sshd 24 Mar 29 18:38 ../

drwxr-xr-x 2 root sshd  6 Mar 29 18:44 events/

drwxr-xr-x 2 root sshd  6 Mar 29 18:44 images/

drwxr-xr-x 2 root sshd  6 Mar 29 18:44 temp/

 

 

Is that right?

Edited by Interstellar
Link to comment
  • 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.