BilboT34Baggins Posted February 14, 2018 Share Posted February 14, 2018 3 hours ago, dlandon said: It's in the docker image, not in unraid. How do i go about running it with a crontab script? I know so little about dockers and how they work its not funny. Quote Link to comment
dlandon Posted February 14, 2018 Author Share Posted February 14, 2018 44 minutes ago, BilboT34Baggins said: How do i go about running it with a crontab script? I know so little about dockers and how they work its not funny. Why do you need to run the cron? What does it do? Quote Link to comment
BilboT34Baggins Posted February 14, 2018 Share Posted February 14, 2018 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. Quote Link to comment
dlandon Posted February 14, 2018 Author Share Posted February 14, 2018 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? Quote Link to comment
BilboT34Baggins Posted February 14, 2018 Share Posted February 14, 2018 (edited) 31 minutes ago, dlandon said: Can you point me to some documentation on this feature? Best i can find. https://wiki.zoneminder.com/Modifying_ZoneMinder_to_remember_run_state_names Edited February 14, 2018 by BilboT34Baggins Fixed url Quote Link to comment
dlandon Posted February 15, 2018 Author Share Posted February 15, 2018 1 hour ago, BilboT34Baggins said: Best i can find. https://wiki.zoneminder.com/Modifying_ZoneMinder_to_remember_run_state_names That method is deprecated and is no longer recommended. Quote Link to comment
dlandon Posted February 15, 2018 Author Share Posted February 15, 2018 1 hour ago, BilboT34Baggins said: Best i can find. https://wiki.zoneminder.com/Modifying_ZoneMinder_to_remember_run_state_names 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. Quote Link to comment
BilboT34Baggins Posted February 15, 2018 Share Posted February 15, 2018 (edited) 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 February 15, 2018 by BilboT34Baggins Quote Link to comment
dlandon Posted February 15, 2018 Author Share Posted February 15, 2018 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. Quote Link to comment
BilboT34Baggins Posted February 15, 2018 Share Posted February 15, 2018 20 minutes 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. What a turnaround! Ill test tonight after work! Quote Link to comment
dlandon Posted February 15, 2018 Author Share Posted February 15, 2018 Just now, BilboT34Baggins said: What a turnaround! Ill test tonight after work! It wasn't hard. Just had to figure out the best way to implement. I don't do states, so let me know how it works. Quote Link to comment
BilboT34Baggins Posted February 16, 2018 Share Posted February 16, 2018 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... Quote Link to comment
dlandon Posted February 16, 2018 Author Share Posted February 16, 2018 3 hours ago, BilboT34Baggins said: 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... The docker was built yesterday. You should be able to update it. Quote Link to comment
RAINMAN Posted February 25, 2018 Share Posted February 25, 2018 (edited) 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 Updated the settings and now i get these errors: Edited February 25, 2018 by RAINMAN Quote Link to comment
dlandon Posted February 25, 2018 Author Share Posted February 25, 2018 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 Updated the settings and now i get these errors: Looks like a memory issue. I'd take this to the Zoneminder forum. The link is in the first post. Quote Link to comment
mgranger Posted March 8, 2018 Share Posted March 8, 2018 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 Quote Link to comment
mgranger Posted March 8, 2018 Share Posted March 8, 2018 Well I completely removed it then reinstalled and it works. Quote Link to comment
Shyrka973 Posted March 14, 2018 Share Posted March 14, 2018 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 / zonemindershould return "root: www-data" but return "nobody: users".This command:chown -R root: www-data / var / cache / zoneminderpositions 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. Quote Link to comment
dlandon Posted March 14, 2018 Author Share Posted March 14, 2018 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 / zonemindershould return "root: www-data" but return "nobody: users".This command:chown -R root: www-data / var / cache / zoneminderpositions 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. Quote Link to comment
Shyrka973 Posted March 15, 2018 Share Posted March 15, 2018 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 ? Quote Link to comment
dlandon Posted March 15, 2018 Author Share Posted March 15, 2018 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. Quote Link to comment
Interstellar Posted March 29, 2018 Share Posted March 29, 2018 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: [email protected]:/# 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...! Quote Link to comment
dlandon Posted March 29, 2018 Author Share Posted March 29, 2018 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: [email protected]:/# 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. Quote Link to comment
Interstellar Posted March 30, 2018 Share Posted March 30, 2018 (edited) 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: [email protected]:/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: [email protected]:/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 March 30, 2018 by Interstellar Quote Link to comment
Recommended Posts
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.