A couple of issues

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

A couple of issues

Post by raydude »

I recently upgraded to 1.34.0. It was pretty easy. Had an issue with mysql but found a security downgrade that fixed the issue.

I have two problems, one is old and one is new. First the old one:

When I attempt to view live video or Montage, I get no playback and a broken picture icon in the top left of Chrome. This has been this way for a long time. I'm not sure what's wrong. This is similar to recording playback. If I choose mp4 playback it works, but if I choose mjpeg, it does not. I might be getting a message in the log that zms is not running when expected to be, but I'm not sure there is a connection between me choosing mjpeg and that red error message. The Montage review page shows all cameras "Offline".

The second problem has to do with a new camera. It has the ability to to H265. But when I select it, the log indicates that zoneminder can't find a codec. I have chosen ffmpeg and it works with h264, but not h265. My ffmpeg is built with x265, is there another module required for ffmpeg to playback h265 streams? Maybe there's a missing library on my system?

Thanks for a great tool. And thanks for the help.
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: A couple of issues

Post by raydude »

Bump?

Any help would be appreciated. What can I look at?
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: A couple of issues

Post by iconnor »

This is the #1 reported problem here. Someone asks every single day. Hopefully I'll be able to do something about that in the next release.

Two possibilities:

#1 your apache is configured wrong with respect to the cgi-bin path. Since you didn't say which distro, I can't advise about the right setting. Your logs should be filling up with errors relating to PATH_ZMS with a link to further information.

#2 your timezone has not been set so authentication isn't working. Your logs should be filling up with complaints about it. Check Options->System->Timezone.
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: A couple of issues

Post by raydude »

Thanks for replying.

I'll check these things out today.
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: A couple of issues

Post by raydude »

I finally installed 1.34.2. I'm still having the same issues. Recordings are working, I can view them, but live and montage do not work. I get this error in the log after attempting to view live stream, is this related?

Code: Select all

\2020-02-22 15:07:40	zmc_m4		3468	INF	Driveway: images:5000 - Capturing at 10.00 fps, capturing bandwidth 514485bytes/sec	zm_monitor.cpp	2545
2020-02-22 15:07:39	zmc_m2		3410	INF	SideYard: images:5000 - Capturing at 10.00 fps, capturing bandwidth 55907bytes/sec	zm_monitor.cpp	2545
2020-02-22 15:07:38	web_php		2990	ERR	Socket /var/run/zm/zms-397875s.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	2170
2020-02-22 15:07:38	web_js		2990	ERR	getStreamCmdResponse stream error: Socket /var/run/zm/zms-397875s.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. - checkStreamForErrors()	?view=watch	
2020-02-22 15:07:36	zma_m3		3636	INF	BackYard: 7400 - Analysing at 14.29 fps	zm_monitor.cpp	1297
2020-02-22 15:07:36	zma_m1		3631	INF	FrontYard: 7400 - Analysing at 14.29 fps	zm_monitor.cpp	1297
2020-02-22 15:07:36	web_php		2990	ERR	Socket /var/run/zm/zms-862509s.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	2170
2020-02-22 15:07:36	web_js		2990	ERR	getStreamCmdResponse stream error: Socket /var/run/zm/zms-862509s.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. - checkStreamForErrors()	?view=watch	
2020-02-22 15:07:35	zmc_m1		3399	INF	FrontYard: images:7400 - Capturing at 14.29 fps, capturing bandwidth 196799bytes/sec	zm_monitor.cpp	2545
2020-02-22 15:07:35	zmc_m3		3421	INF	BackYard: images:7400 - Capturing at 16.67 fps, capturing bandwidth 435713bytes/sec	zm_monitor.cpp	2545
2020-02-22 15:07:34	web_php		2990	ERR	Socket /var/run/zm/zms-058705s.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	2170
2020-02-22 15:07:34	web_js		2990	ERR	getStreamCmdResponse stream error: Socket /var/run/zm/zms-058705s.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. - checkStreamForErrors()	?view=watch	
2020-02-22 15:07:32	web_php		2990	ERR	Socket /var/run/zm/zms-577691s.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.



raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: A couple of issues

Post by raydude »

Can someone help me by giving me a way to figure out what's going on? I would really like live to work.
dextro
Posts: 1
Joined: Mon Mar 30, 2020 10:09 pm

Re: A couple of issues

Post by dextro »

I came here with the same error. Running v1.34.8 on Debian (bullseye/sid). Montage/CGI worked out of the box, I broke it when trying to get the API to work. Looks like we're in between configuration states a bit... The installed apache config (/etc/apache2/conf-available/zoneminder.conf) looked to be relying on a missing .htaccess configuration for the api to work. I was able to find a more modern config (/usr/share/doc/zoneminder/examples/apache.conf) but that one broke Montage/CGI.

@iconner seemed confident this is something solvable on my end 8) so I tried jamming the configurations together... I had to update the ScriptAlias to use /zm/cgi-bin and move it to the top of VirtualHost definition, just under DocumentRoot. The top of my configuration looks like this:

Code: Select all

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot "/usr/share/zoneminder/www"

    # Remember to enable cgi mod (i.e. "a2enmod cgi").
    ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
    <Directory "/usr/lib/zoneminder/cgi-bin">
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        AllowOverride All
        <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>
...    
If my changes do work for others, perhaps I can submit a fix to ZoneMinder/zoneminder/misc/apache.conf.in
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: A couple of issues

Post by raydude »

Thanks for posting Dextro.

I finally got around to playing with this.

One problem with the gentoo distro is how they like to update scripts often. I must have allowed it to overwrite my default_vhost.include file a while back. It changed the default cgi script directory and that's why zms was not accessible.

I set it back to the proper location and everything came up working.

Now the http logs would be so much cleaner if I could figure out this message:

Code: Select all

[Sun Sep 06 17:14:39.402424 2020] [php7:notice] [pid 8308:tid 139719035840256] [client 127.0.0.1:46124] PHP Notice:  Constant ZM_USE_DEEP_STORAGE already defined in /usr/share/zoneminder/www/includes/config.php on line 170, referer: http://localhost/zm/index.php?view=montage
I'm trying to figure out how it is being set twice. I'm starting to think it's in the sql database twice...

I wonder if I do an sql clean if it will be fixed...
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: A couple of issues

Post by iconnor »

I would look instead in conf files in /etc/zm/conf.d.

zmupdate.pl -f

will reload the configuration table.
Post Reply