Live view not working - Unable to authenticate user (zms.cpp 212)
Describe Your Environment
- Version of ZoneMinder: 1.32.3-bionic
- How you installed ZoneMinder: https://wiki.zoneminder.com/Ubuntu_Server_18.04_64-bit_with_Zoneminder_1.32.x_the_easy_way
- Full name and version of OS: Ubuntu 18.04.1 LTS - Bionic
- Browser name and version: Google Chrome 73.0.3683.86, Firefox Quantum 64.0
Describe the bug
Zm is recording feed from the 4 camers is connected to, but when I try to access live feed can't see nothing and geneates errors in log:
- Unable to authenticate user (zms.cpp 212)
- Socket /var/run/zm/zms-999953s.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. /usr/share/zoneminder/www/includes/functions.php 2048
The system worked properly for several months and seems to have stop working yesterday. Don't know if it's correlated, but between yesterday and the day before here in Italy time changed (DST).
To Reproduce Steps to reproduce the behavior: Just open a live feed tab (Cycle, Montage, Montage Review...)
Expected behavior Should be able to see live feed
Relevant part of the config OPT_USE_AUTH - yes AUTH_TYPE - builtin AUTH_RELAY - hashed AUTH_HASH_IPS - yes AUTH_HASH_LOGINS - yes Apache HTTPS server
Debug Logs
2019-04-01 08:00:14 zmc_m4 2677 INF East: images:300 - Capturing at 5.00 fps, capturing bandwidth 15145bytes/sec zm_monitor.cpp 2477
2019-04-01 08:00:14 zms_m1 2949 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:13 zms_m4 2944 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:13 zms_m4 2945 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:13 web_php 1706 ERR Socket /var/run/zm/zms-999953s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:13 zms_m1 2946 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:13 zmfilter_1 2687 INF Checking filter PurgeWhenFull delete returned 0 events zmfilter.pl
2019-04-01 08:00:13 zms_m1 2948 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:13 zma_m2 2664 INF West: 200 - Analysing at 4.76 fps zm_monitor.cpp 1247
2019-04-01 08:00:12 web_php 1288 ERR Socket /var/run/zm/zms-307188s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:12 zms_m4 2942 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:12 zms_m4 2943 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:11 zms_m3 2936 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:11 web_php 1289 ERR Socket /var/run/zm/zms-938276s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:11 zms_m3 2937 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:11 zms_m2 2938 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:11 zms_m3 2939 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:11 zms_m2 2940 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:11 zms_m3 2941 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:10 web_php 1288 ERR Socket /var/run/zm/zms-726399s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:10 zms_m3 2933 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:10 zms_m3 2934 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:10 zms_m3 2935 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:09 zms_m2 2932 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:09 zma_m1 2647 INF Magazzino: 300 - Analysing at 5.00 fps zm_monitor.cpp 1247
2019-04-01 08:00:09 zmc_m3 2668 INF South: images:200 - Capturing at 5.00 fps, capturing bandwidth 19985bytes/sec zm_monitor.cpp 2477
2019-04-01 08:00:09 zms_m2 2931 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:09 zms_m1 2930 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:09 zms_m2 2929 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:09 zms_m1 2928 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:08 web_php 1706 ERR Socket /var/run/zm/zms-938276s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:08 zmc_m2 2651 INF West: images:200 - Capturing at 5.00 fps, capturing bandwidth 22357bytes/sec zm_monitor.cpp 2477
2019-04-01 08:00:08 web_php 1290 ERR Socket /var/run/zm/zms-999953s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:08 zmc_m1 2642 INF Magazzino: images:300 - Capturing at 5.00 fps, capturing bandwidth 176070bytes/sec zm_monitor.cpp 2477
2019-04-01 08:00:08 zms_m4 2927 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:08 zms_m2 2926 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:08 zms_m2 2925 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:08 zms_m4 2924 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:07 web_php 2361 ERR Socket /var/run/zm/zms-938276s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:07 web_php 1291 ERR Socket /var/run/zm/zms-307188s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:07 zms_m2 2923 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:07 zms_m3 2922 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:07 zms_m2 2921 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:07 zms_m3 2920 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:07 zms_m2 2919 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:06 zms_m3 2918 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:06 web_php 1289 ERR Socket /var/run/zm/zms-938276s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:06 zms_m3 2917 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:06 zms_m3 2916 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:06 zms_m3 2915 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:05 zms_m1 2912 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:05 zms_m2 2913 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:05 zms_m1 2914 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:05 web_php 1288 ERR Socket /var/run/zm/zms-726399s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:04 zms_m4 2907 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:04 zms_m3 2908 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:04 zms_m4 2909 ERR Unable to authenticate user zms.cpp 212
2019-04-01 08:00:04 web_php 1289 ERR Socket /var/run/zm/zms-999953s.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. /usr/share/zoneminder/www/includes/functions.php 2048
2019-04-01 08:00:04 web_php 2047 ERR Socket /var/run/zm/zms-938276s.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.readthedo`
Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template!
Update: With OPT_USE_AUTH = OFF, live feed start working again
I am seeing the same issue on ubuntu 18.04.2 LTS and zone minder 1.32 It was a brand new install and i followed the directions listed at https://zoneminder.readthedocs.io/en/latest/installationguide/ubuntu.html#easy-way-ubuntu-18-04
Everything kept pointing to the PATH_ZMS issue but it wasn't until i found some other post about 1.31 and trying AUTH_RELAY = none then it started working.
The camera was RTMP using ffmpeg and h264.
I have just installed 1.32.3 on Ubuntu 18.04 and am also see the "Socket /var/run/zm/zms-956384s.sock does not exist." I tried turning OPT_USE_AUTH off with no change. zmc appears to be running but there is no socket for it in /var/run/zm. There is a zmdc.sock= there.
I can report the same issue on a fresh install on ubuntu 18.04.
I switched the auth relay option to "none" and solved the issue but this is of course reducing the security of the system.
Same as academo. Solved by auth relay to none.
same issue here on Ubuntu 18.04.2 LTS No images vissible on the montage tab or live view. After setting OPT_USE_AUTH = off, everything works again.
However, when setting AUTH_RELAY to NONE it does work. So only when selecting hashed or plain it doesn't work.
Zoneminder version: You are running the most recent version of ZoneMinder, v1.32.3. No update is necessary.
Contents of log:
When not working: 2019-06-24 09:38:41 | zms_m2 | | 3057 | ERR | Unable to authenticate user | zms.cpp | 212
When working: 2019-06-24 09:51:08 | zms_m3 | | 3401 | INF | Authenticated user 'username' | zm_user.cpp | 126 2019-06-24 09:51:08 | zms_m3 | | 3399 | INF | Got signal 15 (Terminated), exiting | zm_signal.cpp | 40
setting auth_relay to none will most likely break newer version of zmNinja. Is this issue prevalent in 1.33?
Getting this as well on multi-server install. Trying to view a USB camera on a oragePi (armhf, Debian Stretch with Armbian Linux 4.19.57-sunxi) from other server (intel, Ubuntu 18.04.2).
Also used easy way: https://zoneminder.readthedocs.io/en/latest/installationguide/ubuntu.html#easy-way-ubuntu-18-04
I have the same issue on Ubuntu 18.04, nginx and Zoneminder 1.33.14~20190821101210-bionic as well. Setting auth_relay to none doesn't help here. Then in get:
fcgiwrap[3595]: terminate called after throwing an instance of 'std::logic_error'
fcgiwrap[3595]: what(): basic_string::_M_construct null not valid
Disabling Auth helps, but I don't want having an open installation.
Edit: Replaced nginx with apache and now it works.
Same experience as everyone above here. Brand new install of Ubuntu 18.04 + ZM 1.32.3 + Apache. Had to set AUTH_RELAY to NONE to make it work.
What implications does this have? Who can do what without authenticating??
BTW I can see there were quite a few changes in the zms code related to auth in the recent months. Perhaps some of it broke it?
https://github.com/ZoneMinder/zoneminder/commits/master/src/zms.cpp
We believe this is not relevant to 1.33.14
Apparently it affects a lot of users. Any chance to backport the fix to stable (!) 1.32 branch? I’m guessing it won’t be a complicated fix. Thanks!
No. We will be releasing 1.34 soon.
I would also check the system timezone with tzdata.
That helped me.
On Tue, Sep 17, 2019, 21:10 Isaac Connor [email protected] wrote:
No. We will be releasing 1.34 soon.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ZoneMinder/zoneminder/issues/2565?email_source=notifications&email_token=AF54UXJR6QVYSVZ65QLQ7MDQKETSDA5CNFSM4HCUYRN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD65SYJI#issuecomment-532360229, or mute the thread https://github.com/notifications/unsubscribe-auth/AF54UXNW5EOKSAUJOI3BYJ3QKETSDANCNFSM4HCUYRNQ .
I would also check the system timezone with tzdata. That helped me.
Brilliant, that was the problem! Mismatch between system timezone and PHP date.timezone. Seems to work now with AUTH_RELAY=hashed :)
I updated my timezone to match my system timezone, but I still can't see any camera's current view without OPT_USE_AUTH = off, but that's not a safe way to run the system.
It appears to still capture events in the background though with the timezone fixed. So I guess a temporary solution is to keep OPT_USE_AUTH = on all the time unless I need to see a live view temporarily.
Setting AUTH_RELAY=plain doesn't fix it for me, so I'm going to leave it as hashed for now since this workaround works until a more permanent fix is found.
If RELAY=plain doesn't fix it, then the issue is not with your timezone.
Same issue here but just after an upgrade from 1.33 to 1.34.2 PHP and system timezone are the same.
AUTH_RELAY=none fixed it but makes me not happy.