Live view not working
Live view not working
ZoneMinder version 1.36.33 running on Fedora 38 server.
None of the live view modes are working. All I get is a white screen with headers and footers. There is not even a frame where the video is supposed to go. This happens in all of montage, camera monitor and zone editing. One result is I cannot edit the motion detection zones. Link to screen shot below.
The system sees the cameras. It says the cameras are capturing. It detects motion, triggers an event, and the recorded event video can be viewed.
The rtsp URLs work in VLC. In VLC I get a real-time view from both cameras.
What else can I check?
Thanks - Bill Gee
https://campercaver.net/MiscFiles/Scree ... 191417.jpg
None of the live view modes are working. All I get is a white screen with headers and footers. There is not even a frame where the video is supposed to go. This happens in all of montage, camera monitor and zone editing. One result is I cannot edit the motion detection zones. Link to screen shot below.
The system sees the cameras. It says the cameras are capturing. It detects motion, triggers an event, and the recorded event video can be viewed.
The rtsp URLs work in VLC. In VLC I get a real-time view from both cameras.
What else can I check?
Thanks - Bill Gee
https://campercaver.net/MiscFiles/Scree ... 191417.jpg
Re: Live view not working
Anyone? Surely someone has some ideas about why live view does not work.
I tried opening FireFox in safe mode which disables all plugins and extensions. That did not work - live view is still just a blank.
I tried opening FireFox in safe mode which disables all plugins and extensions. That did not work - live view is still just a blank.
Re: Live view not working
Which log should I check?
Looking over the ZoneMinder log files, I see HUGE amounts of activity in web_js.log. It has tens of thousands of lines like this:
and like this:
Using "tail -f", I see these messages appear whenever I do much of anything in the ZoneMinder console. Opening the events view of a monitor, for example, or opening a live view of a monitor.
Checking date and time stamps on the other ZoneMinder log files, I see nothing else that changed while I was viewing the console.
I found an older FAQ entry which says to check the settings of ZM_PATH_ZMS. The settings I have are
/etc/zm/conf.d/01-system-paths.conf
ZM_PATH_ZMS=/cgi-bin-zm/nph-zms
/etc/httpd/conf/httpd.conf
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
The directory /var/www/cgi-bin is empty. The binary for zms exists in /usr/libexec/zoneminder/cgi-bin/zms
All of these came from the Fedora repository package. I have not changed anything.
Bill Gee
Looking over the ZoneMinder log files, I see HUGE amounts of activity in web_js.log. It has tens of thousands of lines like this:
Code: Select all
8/11/23, 7:08:27 AM CDT.275313 web_js[7961].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at ?view=events&page=1&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=MonitorId&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=1&filter%5BQuery%5D%5Bsort_asc%5D=1&filter%5BQuery%5D%5Bsort_field%5D=StartDateTime&filter%5BQuery%5D%5Blimit%5D=0 line
Code: Select all
8/11/23, 7:05:16 AM CDT.159271 web_js[857].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at line
8/11/23, 7:05:16 AM CDT.168135 web_js[856].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at line
8/11/23, 7:05:16 AM CDT.689207 web_js[7961].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at line
8/11/23, 7:05:16 AM CDT.700238 web_js[855].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at line
8/11/23, 7:05:17 AM CDT.216592 web_js[2045].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at line
8/11/23, 7:05:17 AM CDT.232629 web_js[854].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at line
8/11/23, 7:05:17 AM CDT.737405 web_js[858].ERR [192.168.17.84] [eval%20violated%20CSP%20script-src] at line
Checking date and time stamps on the other ZoneMinder log files, I see nothing else that changed while I was viewing the console.
I found an older FAQ entry which says to check the settings of ZM_PATH_ZMS. The settings I have are
/etc/zm/conf.d/01-system-paths.conf
ZM_PATH_ZMS=/cgi-bin-zm/nph-zms
/etc/httpd/conf/httpd.conf
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
The directory /var/www/cgi-bin is empty. The binary for zms exists in /usr/libexec/zoneminder/cgi-bin/zms
All of these came from the Fedora repository package. I have not changed anything.
Bill Gee
Re: Live view not working
The Fedora installation policy as well as the official debian policy would have you read all the docs and configure everything yourself, understanding all the security implications of everything.
Me, here in ubuntu land just like to make it work out of the box.
So anyways, you have found the source of your problem. The zm package puts the cgi in one place and your config says its in another. Sync them up and it should work.
As to the csp warnings, when we see that it is usually due to a browser plugin scraping data and trying to send it somewhere, which we deny. So try it without plugins and then enable each one one at a time until you figure out which one it is. If it happens without plugins, we can try to see if it is in fact a bug in our code, but this stuff is pretty mature at this point.
Me, here in ubuntu land just like to make it work out of the box.
So anyways, you have found the source of your problem. The zm package puts the cgi in one place and your config says its in another. Sync them up and it should work.
As to the csp warnings, when we see that it is usually due to a browser plugin scraping data and trying to send it somewhere, which we deny. So try it without plugins and then enable each one one at a time until you figure out which one it is. If it happens without plugins, we can try to see if it is in fact a bug in our code, but this stuff is pretty mature at this point.
Re: Live view not working
Yeah, I am in the "Just Work" camp.
So what values should I put in those two config files? I tried a few things but nothing changed. Still no live view.
First - I set ZM_PATH_ZMS=/usr/libexec/zoneminder/cgi-bin/nph-zms. Restarted zoneminder service.
Second - I created a new directory /var/www/cgi-bin-zm. The directory is root:root and 0755 permissions, which matches cgi-bin.
In that directory I created two soft links that point to the true locations of nph-zms and zms. I also changed ZM_PATH_ZMS = /cgi-bin/zm/nph-zms which is the original value. The links are root:root and 777 permissions. I restarted both zoneminder and httpd services.
Third - I created the same two soft links in /var/www/cgi-bin. Same owner and permissions. Restarted both zoneminder and httpd.
Still no luck. If I change to either /var/www/cgi-bin or /var/www/cgi-bin-zm and run "zms --version", it reports the current time and [no query string]. This is good - it means zms runs.
If the system cannot find nph-zms, where would it log that error? I looked through all of the ZoneMinder and Apache logs, and found zero references to either zms or nph-zms. Looking in the main system log /var/log/messages, I find lines like this:
Note the time stamp on this - Yesterday. There are no such messages from today. The message above is the most recent such message in the messages file. The messages file does contain thousands of lines like this:
I looked at the URL from that long message. It has nothing new, and in particular does not say exactly how to determine what the correct values are for ScriptAlias and ZM_PATH_ZMS. It only says they have to match. But dammit, they cannot match! ZM_PATH_ZMS contains the name of the executable and ScriptAlias does not.
Maybe the CSP errors need a new topic? I tried running Firefox in safe mode, which disables all plugins, and they still show up in buckets. I thought for a short time it might be due to using IPv6, but changing to IPv4 did not do anything to the messages.
Bill Gee
So what values should I put in those two config files? I tried a few things but nothing changed. Still no live view.
First - I set ZM_PATH_ZMS=/usr/libexec/zoneminder/cgi-bin/nph-zms. Restarted zoneminder service.
Second - I created a new directory /var/www/cgi-bin-zm. The directory is root:root and 0755 permissions, which matches cgi-bin.
In that directory I created two soft links that point to the true locations of nph-zms and zms. I also changed ZM_PATH_ZMS = /cgi-bin/zm/nph-zms which is the original value. The links are root:root and 777 permissions. I restarted both zoneminder and httpd services.
Third - I created the same two soft links in /var/www/cgi-bin. Same owner and permissions. Restarted both zoneminder and httpd.
Still no luck. If I change to either /var/www/cgi-bin or /var/www/cgi-bin-zm and run "zms --version", it reports the current time and [no query string]. This is good - it means zms runs.
If the system cannot find nph-zms, where would it log that error? I looked through all of the ZoneMinder and Apache logs, and found zero references to either zms or nph-zms. Looking in the main system log /var/log/messages, I find lines like this:
Code: Select all
Aug 10 16:10:40 zoneminder2 web_php[854]: 8/10/23, 4:10:40 PM CDT.650663 web_php[854].ERR [fdc4:aeae:eaea:cf00::20] [Socket /var/lib/zoneminder/sock/zms-264981s.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.] at /usr/share/zoneminder/www/includes/functions.php line 1882
Code: Select all
Aug 11 09:22:39 zoneminder2 web_php[7961]: 8/11/23, 9:22:39 AM CDT.838009 web_js[7961].ERR [fdc4:aeae:eaea:cf00::20] [eval%20violated%20CSP%20script-src] at ?view=watch&mid=2 line
Maybe the CSP errors need a new topic? I tried running Firefox in safe mode, which disables all plugins, and they still show up in buckets. I thought for a short time it might be due to using IPv6, but changing to IPv4 did not do anything to the messages.
Bill Gee
Re: Live view not working
More information - I dug around in the Apache configuration files and found something interesting. This is a snippet from /etc/httpd/conf.d/zoneminder.httpd.conf which is actually a soft link to /etc/zm/www/zoneminder.httpd.conf.
I assume Apache can have multiple ScriptAlias settings. Right? If so, then this should make it all work.
Am I missing something bloody obvious??
Code: Select all
ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
<Directory "/usr/libexec/zoneminder/cgi-bin">
# SSLRequireSSL
AllowOverride None
Options +ExecCGI +FollowSymLinks
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
Am I missing something bloody obvious??
Re: Live view not working
It can have multiple ScriptAlias but it depends on context which one takes precedence. Using virtualhosts simplifies things a bit. I know in ubuntu land I frequently have to remove the default config to get zms to work.
Any errors should be logged by apache. In this case likely 404's for not finding the zms executable.
Any errors should be logged by apache. In this case likely 404's for not finding the zms executable.
Re: Live view not working
@bgee56 In the console, under "Events" do you see a number? If you click on the number, if it's blue, it should take you to a list of events with snap shots. If you can see this I guess it's capturing the camera images OK and storing them in your database. This is the case for me.
But you can't see an image thumbnail in the console or, if you select Montage, you only see the headers (as you said originally). This is the case for me.
Sorry to be of absolutely no help whatsoever, but if your issue is the same as mine then if I fix mine I'll update this post.
My Logs show no errors. Although a typical message is
BTW I use Arch Linux (Endeavouros), I have Apache installed and MariaDB.
Roger
But you can't see an image thumbnail in the console or, if you select Montage, you only see the headers (as you said originally). This is the case for me.
Sorry to be of absolutely no help whatsoever, but if your issue is the same as mine then if I fix mine I'll update this post.
My Logs show no errors. Although a typical message is
. The Capturing is at a sensible rate but the Analyzing rate seems a tad slow at 0.0fpsAnnke 3: 45300 - Capturing at 12.48 fps, capturing bandwidth 274800bytes/sec Analysing at 0.00 fps
BTW I use Arch Linux (Endeavouros), I have Apache installed and MariaDB.
Roger
Re: Live view not working
iconnor - I searched the Apache logs for "zms" and found nothing. There are quite a few hits on 404, but the message does not mention zms or any other URI that I can see.
Looking at this closer, it is not a 404 error. It is a perfectly normal request from a browser . The parameter eids is set to 4041 which is why it matches my grep pattern.
RogerP - Yes, I see a number in the events column. I can click on that number and get a list of recorded events. Clicking on the event name will playback the recording. This part works with no problems. There is no snapshot, but I think that is because I did not turn on snapshots. On both of my monitors, the setting for "Save JPEGs" is set to Disabled.
When I select any of a monitor, the montage view or editing the zones for a monitor, I do not see a live view. In the zone editor there is a red rectangle which marks the zone border, but no image is inside the border. I have - for now - only one zone on each camera. This thread was triggered when I went to edit the zones and could not see anything to help me set the zone borders.
Grep-ing the ZoneMinder log files, I see nothing that has either "Capturing at" or "capturing bandwidth" in it. I may have turned off this message in the ZoneMinder log file settings. Log_Level_Syslog and Log_Level_File are both set to "Warning".
Code: Select all
[root@zoneminder2 httpd]# ll
total 12464
-rw-r--r-- 1 root root 252946 Aug 13 10:31 access_log
-rw-r--r-- 1 root root 58855 Jul 25 09:53 access_log-20230726
-rw-r--r-- 1 root root 735743 Jul 29 14:34 access_log-20230730
-rw-r--r-- 1 root root 3581168 Aug 5 19:41 access_log-20230806
-rw-r--r-- 1 root root 8078759 Aug 12 06:27 access_log-20230813
-rw-r--r-- 1 root root 557 Aug 13 00:00 error_log
-rw-r--r-- 1 root root 2705 Jul 23 00:00 error_log-20230723
-rw-r--r-- 1 root root 1726 Jul 30 00:00 error_log-20230730
-rw-r--r-- 1 root root 1882 Aug 6 00:00 error_log-20230806
-rw-r--r-- 1 root root 3876 Aug 13 00:00 error_log-20230813
-rw-r--r-- 1 root root 0 Mar 24 05:57 ssl_access_log
-rw-r--r-- 1 root root 0 Mar 26 00:00 ssl_error_log
-rw-r--r-- 1 root root 304 Mar 24 05:57 ssl_error_log-20230326
-rw-r--r-- 1 root root 0 Mar 24 05:57 ssl_request_log
[root@zoneminder2 httpd]# grep zms *_log
[root@zoneminder2 httpd]# grep 404 *_log | tail --lines=1
access_log:fdc4:aeae:eaea:cf00::20 - - [13/Aug/2023:10:28:20 -0500] "GET /zm/index.php?request=events&task=delete&eids%5B%5D=4035&eids%5B%5D=4041 HTTP/1.1" 200 15 "http://zoneminder2.billgee.local/zm/index.php?view=events&page=1&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=MonitorId&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=2&filter%5BQuery%5D%5Bsort_asc%5D=1&filter%5BQuery%5D%5Bsort_field%5D=StartDateTime&filter%5BQuery%5D%5Blimit%5D=0" "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/116.0"
RogerP - Yes, I see a number in the events column. I can click on that number and get a list of recorded events. Clicking on the event name will playback the recording. This part works with no problems. There is no snapshot, but I think that is because I did not turn on snapshots. On both of my monitors, the setting for "Save JPEGs" is set to Disabled.
When I select any of a monitor, the montage view or editing the zones for a monitor, I do not see a live view. In the zone editor there is a red rectangle which marks the zone border, but no image is inside the border. I have - for now - only one zone on each camera. This thread was triggered when I went to edit the zones and could not see anything to help me set the zone borders.
Grep-ing the ZoneMinder log files, I see nothing that has either "Capturing at" or "capturing bandwidth" in it. I may have turned off this message in the ZoneMinder log file settings. Log_Level_Syslog and Log_Level_File are both set to "Warning".
Re: Live view not working
Just a quick update - This issue is not resolved.
- AllenTuttle
- Posts: 30
- Joined: Tue Sep 25, 2007 4:56 pm
- Location: Sequim WA.
Re: Live view not working
BGee56 did you ever find a resolution?
I have exactly the same issues on a Ubuntu 22.04.3 LTS system.
Zoneminder worked for a couple years and I kept everything updated.
Unfortunately an update four months ago broke Zoneminder resulting in no 'live view' and no image in 'Zone Edit' which also breaks the ability to edit the zones.
I've compared all the Abache and ZM config files to those on a working Ubuntu 22.04.3 LTS system and everything is the same.
Oddly some of the screens render a little differently.
The broken ZM gets the "This plugin is not supported" trying to view using 'embed':
<embed type="video/mpeg" src="/zm/cgi-bin/nph-zms?mode=mpeg&scale=100&bitrate=150000&maxfps=30&format=mpg&monitor=1&rand=1705199932" name="R2c" width="" height="" autostart="1" autoplay="1" showcontrols="0" controller="0">
The working ZM makes a very different call to the same camera:
<img id="liveStream1" src="http://homeserver/zm/cgi-bin/nph-zms?mo ... key=388202" alt="R2c" style="height: 165px;">
I have exactly the same issues on a Ubuntu 22.04.3 LTS system.
Zoneminder worked for a couple years and I kept everything updated.
Unfortunately an update four months ago broke Zoneminder resulting in no 'live view' and no image in 'Zone Edit' which also breaks the ability to edit the zones.
I've compared all the Abache and ZM config files to those on a working Ubuntu 22.04.3 LTS system and everything is the same.
Oddly some of the screens render a little differently.
The broken ZM gets the "This plugin is not supported" trying to view using 'embed':
<embed type="video/mpeg" src="/zm/cgi-bin/nph-zms?mode=mpeg&scale=100&bitrate=150000&maxfps=30&format=mpg&monitor=1&rand=1705199932" name="R2c" width="" height="" autostart="1" autoplay="1" showcontrols="0" controller="0">
The working ZM makes a very different call to the same camera:
<img id="liveStream1" src="http://homeserver/zm/cgi-bin/nph-zms?mo ... key=388202" alt="R2c" style="height: 165px;">
Re: Live view not working
You have Options -> High BW -> WEB_H_STREAM_METHOD set to mpeg instead of jpeg. This is old stuff from like ie6 days and it gets removed from modern browsers.