dlandon Posted March 7, 2019 Author Share Posted March 7, 2019 7 minutes ago, Faspina said: I have tried getting the userscript.sh as stated in your OP to run but I don't think its working .What is weird is I see this in the log *** Running /etc/my_init.d/999_advanced_script.sh... Userscript Provided *** Running /etc/rc.local... *** Booting runit daemon... *** Runit started as PID 927 Mar 7 09:03:11 cbd80626d0d2 cron[930]: (CRON) INFO (pidfile fd = 3) Mar 7 09:03:11 cbd80626d0d2 cron[930]: (CRON) INFO (Running @reboot jobs) Mar 7 09:03:11 cbd80626d0d2 zmeventnotification[913]: INF [using config file: /etc/zm/zmeventnotification.ini] Mar 7 09:03:11 cbd80626d0d2 zmeventnotification[913]: INF [Push enabled via FCM] Mar 7 09:03:11 cbd80626d0d2 zmeventnotification[913]: INF [MQTT Enabled] Mar 7 09:03:11 cbd80626d0d2 zmeventnotification[913]: INF [You are running version: 3.2-docker] I did chmod +x userscript.sh have ADVANCED_SCRIPT 1 as a variable in my docker setup when I drop into the docker console pip is not found. shouldn't it have been installed by the user script below. #!/bin/sh # Python modules needed for hook processing apt-get -y install python-pip pip install numpy opencv-python imutils configparser Shapely pip ./setup.py install # Install for face recognition pip install face_recognition If you are looking for support, this is the best place for it. Posting an issue on github that is really support is not going to get you help any faster, in fact it's rather annoying. Looks like an issue with the ADVANCED_SCRIPT environment variable. Get into the docker and run this: /etc/my_init.d/999_advanced_script.sh Your user script should run. If not, then check the environment variable: echo $ADVANCED_SCRIPT It should show 1. If not: ADVANCED_SCRIPT=1 and try again. Quote Link to comment
Faspina Posted March 7, 2019 Share Posted March 7, 2019 19 minutes ago, dlandon said: If you are looking for support, this is the best place for it. Posting an issue on github that is really support is not going to get you help any faster, in fact it's rather annoying. Looks like an issue with the ADVANCED_SCRIPT environment variable. Get into the docker and run this: /etc/my_init.d/999_advanced_script.sh Your user script should run. If not, then check the environment variable: echo $ADVANCED_SCRIPT It should show 1. If not: ADVANCED_SCRIPT=1 and try again. I think I got it I had several problems. it was not picking up the script variable. I copied and pasted from here maybe something was wonky, then they script filed was not saved in a good linux format deleted it and rebuilt in in nano on the host. that seem to work. Quote Link to comment
itfcjim Posted March 11, 2019 Share Posted March 11, 2019 Hi all, I've had ZM setup for a couple of months now with my four IP cameras (RTSP streams), but only now getting chance to have a play with it properly. Trying to look at events sometimes works, sometimes not (mostly not), I get the error "the video could not be loaded either because the server or network failed or because the format is not supported" when trying to view the video. Also seeing quite a lot of this sort of thing in the logs: Socket /var/run/zm/zms-962963s.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. Viewing the live camera feed always works great. Any ideas? Thanks for your hard work in making this container and keeping the support going 🙂 Quote Link to comment
dlandon Posted March 11, 2019 Author Share Posted March 11, 2019 13 minutes ago, itfcjim said: I've had ZM setup for a couple of months now with my four IP cameras (RTSP streams), but only now getting chance to have a play with it properly. Trying to look at events sometimes works, sometimes not (mostly not), I get the error "the video could not be loaded either because the server or network failed or because the format is not supported" when trying to view the video. Is this on a browser? You might be low on shared memory. On the Zoneminder UI, check the shared memory (/dev/shm). You want to shoot for about 50%, Where do you have the appdata/Zoneminder mapped? Quote Link to comment
itfcjim Posted March 11, 2019 Share Posted March 11, 2019 1 minute ago, dlandon said: Is this on a browser? You might be low on shared memory. On the Zoneminder UI, check the shared memory (/dev/shm). You want to shoot for about 50%, Where do you have the appdata/Zoneminder mapped? Hey man, yeah it's on Chrome Top bar of the UI says /dev/shm: 3% Appdata is at /mnt/user/appdata/Zoneminder which is setup to use a 500GB SSD cache drive Thanks for coming back so quickly Quote Link to comment
dlandon Posted March 11, 2019 Author Share Posted March 11, 2019 Just now, itfcjim said: Top bar of the UI says /dev/shm: 3% Cut down on the 'Shared Memory' so there is more memory for Unraid and Dockers. Quote Link to comment
itfcjim Posted March 11, 2019 Share Posted March 11, 2019 4 minutes ago, dlandon said: Cut down on the 'Shared Memory' so there is more memory for Unraid and Dockers. OK, it was set to 50%, I've changed it to 25%. Will be in touch Cheers Quote Link to comment
itfcjim Posted March 11, 2019 Share Posted March 11, 2019 OK. Not seeing any errors in the log any more - just this warning every so often: Buffer overrun at index 0, image 520, slow down capture, speed up analysis or increase ring buffer size Events still showing the same error Quote Link to comment
dlandon Posted March 12, 2019 Author Share Posted March 12, 2019 1 hour ago, itfcjim said: OK. Not seeing any errors in the log any more - just this warning every so often: Buffer overrun at index 0, image 520, slow down capture, speed up analysis or increase ring buffer size Events still showing the same error Cut down on the shared memory until you get about 50% showing on the Zoneminder UI /dev/shm. You need to limit the frame rate on your cameras to 5 frames per second. Then set these settings for each camera: 20 FPS might be too much for your situation. Cut it down to 10 FPS. Don't fill in the 'Analysis FPS'. Your camera frame rate controls this. You can change all these settings later if you want to increase the frame rate. Quote Link to comment
mbc0 Posted March 12, 2019 Share Posted March 12, 2019 Hi, I have just installed this docker as I want to move away from yearly licences and a Windows VM to run Blue Iris. I have viewed lots of guides and youtube videos to add my Hikvision Cameras but I do not have the rtsp method available from the pull down menu? How do I get around this? Quote Link to comment
dlandon Posted March 12, 2019 Author Share Posted March 12, 2019 3 minutes ago, mbc0 said: Hi, I have just installed this docker as I want to move away from yearly licences and a Windows VM to run Blue Iris. I have viewed lots of guides and youtube videos to add my Hikvision Cameras but I do not have the rtsp method available from the pull down menu? How do I get around this? Use TCP. Quote Link to comment
mbc0 Posted March 12, 2019 Share Posted March 12, 2019 4 minutes ago, dlandon said: Use TCP. I have been trying TCP but with no joy, can you see any obvious errors in this line? rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0 Quote Link to comment
dlandon Posted March 13, 2019 Author Share Posted March 13, 2019 3 hours ago, mbc0 said: I have been trying TCP but with no joy, can you see any obvious errors in this line? rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0 That might be right for your cameras, Mine is rtsp://admin:[email protected]. Be sure you have the 'Source type' set to Ffmpeg. Check and see if your camera is listed in the 'Presets'. Look up on Google to see if you can find a Zoneminder setup for your model camera. You will probably get better help on the Zoneminder forum. Quote Link to comment
Mlatx Posted March 15, 2019 Share Posted March 15, 2019 I have a couple issues going on right now with the latest version. First, I setup a reverse proxy using letsencrypt. I am able to login through Chrome and the zmninja ios app. I cannot login through Firefox, Safari, or IE. I setup my proxy.conf file according to my last post https://forums.unraid.net/?app=core&module=system&controller=content&do=find&content_class=forums_Topic&content_id=56632&content_commentid=724628. I've attached the screenshot I get from Safari and IE, and Firefox say the connection was reset. The other strange thing going on is I am was able to see my events in Chrome, and now I see a white screen with no controls. This is a video I was able to see 2 days ago. When I try to download the video using the video link it says not video found. Then I click it again, and it shows my download options. However, when I try to access the video there is no content. Does anyone know how to fix this? Quote Link to comment
dlandon Posted March 17, 2019 Author Share Posted March 17, 2019 On 3/15/2019 at 1:33 AM, Mlatx said: I have a couple issues going on right now with the latest version. First, I setup a reverse proxy using letsencrypt. I am able to login through Chrome and the zmninja ios app. I cannot login through Firefox, Safari, or IE. I setup my proxy.conf file according to my last post https://forums.unraid.net/?app=core&module=system&controller=content&do=find&content_class=forums_Topic&content_id=56632&content_commentid=724628. I've attached the screenshot I get from Safari and IE, and Firefox say the connection was reset. The other strange thing going on is I am was able to see my events in Chrome, and now I see a white screen with no controls. This is a video I was able to see 2 days ago. When I try to download the video using the video link it says not video found. Then I click it again, and it shows my download options. However, when I try to access the video there is no content. Does anyone know how to fix this? It looks like you have an issue with the proxy. Quote Link to comment
Faspina Posted March 18, 2019 Share Posted March 18, 2019 I finally got object detection working on my under powered Unraid server. It actually works pretty good pass the detected:car message in MQTT as part of the alarm. I have not played with the filitering in objectdetect.ini I had to make modifications to the userscript.sh in the OP to get it to work. It was missing some components that I discovered dropping into the container and running "bash /user/bin/detect_wrapper.sh EID MID where EID is event ID and MID is the monitor ID. #!/bin/sh # Python modules needed for hook processing apt-get -y install python-pip cmakeapt-get -y install libsm6 libxext6 libxrender1 libfontconfig1 pip install numpy opencv-python imutils configparser Shapely future python setup.py install # Install for face recognition pip install face_recognition Quote Link to comment
Mlatx Posted March 18, 2019 Share Posted March 18, 2019 17 hours ago, dlandon said: It looks like you have an issue with the proxy. There may be an issue somewhere. The thing I don't get is that I can see the events and feeds from zm ninja app, which uses my reverse proxy. Also I can see the feeds through Chrome but not the events. Every other browser shows that error. Quote Link to comment
dlandon Posted March 18, 2019 Author Share Posted March 18, 2019 3 hours ago, Faspina said: I finally got object detection working on my under powered Unraid server. It actually works pretty good pass the detected:car message in MQTT as part of the alarm. I have not played with the filitering in objectdetect.ini I had to make modifications to the userscript.sh in the OP to get it to work. It was missing some components that I discovered dropping into the container and running "bash /user/bin/detect_wrapper.sh EID MID where EID is event ID and MID is the monitor ID. #!/bin/sh # Python modules needed for hook processing apt-get -y install python-pip cmakeapt-get -y install libsm6 libxext6 libxrender1 libfontconfig1 pip install numpy opencv-python imutils configparser Shapely future python setup.py install # Install for face recognition pip install face_recognition I made the changes to the first post based on your feedback. I have no time to test this at the moment. Quote Link to comment
Faspina Posted March 19, 2019 Share Posted March 19, 2019 20 hours ago, dlandon said: I made the changes to the first post based on your feedback. I have no time to test this at the moment. It seems to be working well and doesn't require as much CPU as some of the other object detect solutions I have seen with home assistant. I will be playing with face recognition later. I will keep you posted. Thanks for putting the framework in place!!! Quote Link to comment
Mlatx Posted March 19, 2019 Share Posted March 19, 2019 On 3/17/2019 at 6:37 PM, dlandon said: It looks like you have an issue with the proxy. After a bit more research, I figured out my issue. Chrome seems to resolve the /zm folder. Whereas other browsers don't. So when I type zoneminder.mydomain.com in a browser other than Chrome I get the nginx page. When I type zoneminder.mydomain.com/zm it works. Is there any way to configure zoneminders so that when I type just zoneminder.mydomain.com it goes to the root folder? Quote Link to comment
dlandon Posted March 19, 2019 Author Share Posted March 19, 2019 33 minutes ago, Mlatx said: After a bit more research, I figured out my issue. Chrome seems to resolve the /zm folder. Whereas other browsers don't. So when I type zoneminder.mydomain.com in a browser other than Chrome I get the nginx page. When I type zoneminder.mydomain.com/zm it works. Is there any way to configure zoneminders so that when I type just zoneminder.mydomain.com it goes to the root folder? I don't think so. Ask on the Zoneminder forum. Quote Link to comment
cmeyer86 Posted March 28, 2019 Share Posted March 28, 2019 Hello, i actually have the following issue. today i restarted my server the Zoneminder docker update itself and now it goes in a state where i get the following error: Mar 28 22:46:52 e6400d5aeeec zmwatch[740]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:] and a bit later Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.887130, 'undef', 0, 863, -2, 'ERR', 'Can\'t connect to server: Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\' (111)', 'zm_db.cpp', 55 )) error(MySQL server has gone away)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.887254, 'undef', 0, 863, -2, 'ERR', 'Can\'t run query: MySQL server has gone away', 'zm_config.cpp', 344 )) error(MySQL server has gone away)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't run query: MySQL server has gone away] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.888397, 'undef', 0, 864, -2, 'ERR', 'Can\'t connect to server: Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\' (111)', 'zm_db.cpp', 55 )) error(MySQL server has gone away)] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.888483, 'undef', 0, 864, -2, 'ERR', 'Can\'t run query: MySQL server has gone away', 'zm_config.cpp', 344 )) error(MySQL server has gone away)] i already made the hole container new, but here i get the same error... mfg Chris Quote Link to comment
dlandon Posted March 28, 2019 Author Share Posted March 28, 2019 41 minutes ago, cmeyer86 said: Hello, i actually have the following issue. today i restarted my server the Zoneminder docker update itself and now it goes in a state where i get the following error: Mar 28 22:46:52 e6400d5aeeec zmwatch[740]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:] and a bit later Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.887130, 'undef', 0, 863, -2, 'ERR', 'Can\'t connect to server: Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\' (111)', 'zm_db.cpp', 55 )) error(MySQL server has gone away)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.887254, 'undef', 0, 863, -2, 'ERR', 'Can\'t run query: MySQL server has gone away', 'zm_config.cpp', 344 )) error(MySQL server has gone away)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[863]: ERR [undef] [Can't run query: MySQL server has gone away] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.888397, 'undef', 0, 864, -2, 'ERR', 'Can\'t connect to server: Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\' (111)', 'zm_db.cpp', 55 )) error(MySQL server has gone away)] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] Mar 28 22:46:52 e6400d5aeeec undef[864]: ERR [undef] [Can't insert log entry: sql(INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( 1553809612.888483, 'undef', 0, 864, -2, 'ERR', 'Can\'t run query: MySQL server has gone away', 'zm_config.cpp', 344 )) error(MySQL server has gone away)] i already made the hole container new, but here i get the same error... mfg Chris You have a database issue. Are you using the built in mysql database or an external database? Making a new container won't fix the issue. Quote Link to comment
falcor Posted March 30, 2019 Share Posted March 30, 2019 Just started using this, and I have my control script in my zoneminder appdata control directory, permissioned well, and it won't seem to copy to the perl area on container startup. Any advice? Quote Link to comment
dlandon Posted March 30, 2019 Author Share Posted March 30, 2019 4 hours ago, falcor said: Just started using this, and I have my control script in my zoneminder appdata control directory, permissioned well, and it won't seem to copy to the perl area on container startup. Any advice? Looks to be a problem with the copy. What is the extension of the control file? .pm? 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.