No live camera view and errors when viewing

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
withanHdammit
Posts: 4
Joined: Tue May 05, 2020 9:59 pm

No live camera view and errors when viewing

Post by withanHdammit »

This is a fresh install on Debian Buster using the wiki install guide https://wiki.zoneminder.com/Debian_10_B ... om_ZM_Repo
ZM = v1.34.10
Apache = v2.4.38
PHP = v7.4.5

I have my first camera added (currently only in monitor mode), and when looking at the logs, they appear to show the camera is working. The source path works correctly when viewed in VLC, so I'm certain that is correct.

Logs when initially viewing:

Code: Select all

05/05/20 15:03:01.854905 zmc_m1[30769].INF-zm_monitor.cpp/2540 [cam-FrontDoor: images:1471600 - Capturing at 33.33 fps, capturing bandwidth 293274bytes/sec]
05/05/20 15:03:05.198936 zmc_m1[30769].INF-zm_monitor.cpp/2540 [cam-FrontDoor: images:1471700 - Capturing at 25.00 fps, capturing bandwidth 220636bytes/sec]
When I look at the live view, it only shows a broken image and the logs start showing errors:
https://www.dropbox.com/s/io46vpw18b02j ... e.png?dl=0

The logs show a lot of this:

Code: Select all

05/05/20 15:27:09.908267 web_js[7331].ERR [172.24.42.250] [getStreamCmdResponse stream error: Socket /var/run/zm/zms-149943s.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()] at ?view=watch line
and

Code: Select all

Socket /var/run/zm/zms-050322s.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.
Both of which refer to the same thing, but aren't actually helpful.
I checked the /var/run/zm and it has the appropriate permissions and is clearly creating the .sock files there:

Code: Select all

root@zm:/var/run# ls -lh zm
total 4.0K
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid
srwxr-xr-x 1 www-data www-data 0 May  5 15:31 zms-660725w.sock
root@zm:/var/run# ls -lh zm
total 4.0K
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid
root@zm:/var/run# ls -lh zm
total 4.0K
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid
srwxr-xr-x 1 www-data www-data 0 May  5 15:31 zms-472752w.sock
root@zm:/var/run# ls -lh zm
total 4.0K
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid
srwxr-xr-x 1 www-data www-data 0 May  5 15:31 zms-472752w.sock
I'm not really sure where to go from here. Any assistance is greatly appreciated!
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: No live camera view and errors when viewing

Post by bbunge »

Use VLC to check the resolution you should use.
withanHdammit
Posts: 4
Joined: Tue May 05, 2020 9:59 pm

Re: No live camera view and errors when viewing

Post by withanHdammit »

Both Zoneminder and the camera are configured for 1920x1080.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: No live camera view and errors when viewing

Post by bbunge »

OK, but the camera may not be using that exact resolution. Have seen it many times and is worth a check.

Camera resolution in Zoneminder does not match camera output. Use VLC (Tools, Media Information, Codec) to check camera Display Resolution.

Also, if you are on a server with low RAM use half of the camera resolution to start.
denvid
Posts: 14
Joined: Thu Jan 10, 2019 10:27 am

Re: No live camera view and errors when viewing

Post by denvid »

It looks like that I have exactly the same problem. Fresh install on Ubuntu 18.04 LTS. I´m searching since 4 days to find the error :cry: At first start after install of Zoneminder, I could see the live stream in the Zoneminder´s webend, so everything worked well.

Since I did the first reboot of the server it fails and I didn´t changed anything after first start of Zoneminder when it works and first reboot, not regarding hardware not at the configuration. If now I click at "console => name of the camera" the browser window changes regarding the size of the defined capture resolution (pixels) (in my example 640x380) and under it I can see the buttons to stop, continue and zoom the camera picture (which I can´t see). I also can´t play the events, which are grabbed by one camera. The pictures as jpeg are stored on the disc and I can open from a samba share, but instead of playing on the Zoneminder´s webend there is just a white space.

I´m running Firefox on Windows managing Zoneminder. However, I tried with different other browsers, no one is showing a camera stream in Zoneminder webend.

For test reasons I added just one camera with 2 rtsp streams (highres and lowres) and setup the lowres stream as capturing. This works well, I can find a lot of pictures on the disc. Also I can see both live streams in VLC as I added into Zoneminder´s configuration:
rtsp://USER:PASSWORD@192.168.50.100:554/Streaming/Channels/102
2020-05-06 16:42:36.792677 zms_m3[3584].ERR-zms.cpp/207 [Unable to authenticate user]
2020-05-06 16:42:36.641299 zms_m3[3583].ERR-zms.cpp/207 [Unable to authenticate user]
2020-05-06 16:42:36.171929 web_php[3016].ERR-/usr/share/zoneminder/www/includes/functions.php/2177 [Socket /var/run/zm/zms-577564s.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/lat ... window-etc for more information.]
2020-05-06 16:42:35.130952 zmc_m1[1830].INF-zm_monitor.cpp/2540 [01-Carport-HD: images:124000 - Capturing at 20.00 fps, capturing bandwidth 140347bytes/sec]
2020-05-06 16:42:34.624862 zmc_m3[3196].INF-zm_monitor.cpp/2540 [01-Carport-low-test: images:4600 - Capturing at 20.00 fps, capturing bandwidth 17608bytes/sec]
2020-05-06 16:42:34.610204 zma_m3[3200].INF-zm_monitor.cpp/1297 [01-Carport-low-test: 4500 - Analysing at 20.00 fps]
2020-05-06 16:42:34.403617 zms_m3[3579].ERR-zms.cpp/207 [Unable to authenticate user]
2020-05-06 16:42:33.910218 web_php[3016].ERR-/usr/share/zoneminder/www/includes/functions.php/2177 [Socket /var/run/zm/zms-454779s.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/lat ... window-etc for more information.]
2020-05-06 16:42:31.768943 zms_m3[3575].ERR-zms.cpp/207 [Unable to authenticate user]
2020-05-06 16:42:31.626850 zms_m3[3574].ERR-zms.cpp/207 [Unable to authenticate user]
Any ideas?
denvid
Posts: 14
Joined: Thu Jan 10, 2019 10:27 am

Re: No live camera view and errors when viewing

Post by denvid »

In the Wiki section "Socket_sendto or no live streaming" I can find the hint:

From console go to Options->Path and make sure PATH_ZMS is set to /zm/cgi-bin/nph-zms.


Where can I find "PATH_ZMS"?

I wasnß t able to find in the web-backend and also not in any config-file.

Thanks!
withanHdammit
Posts: 4
Joined: Tue May 05, 2020 9:59 pm

Re: No live camera view and errors when viewing

Post by withanHdammit »

bbunge wrote: Wed May 06, 2020 1:27 pm OK, but the camera may not be using that exact resolution. Have seen it many times and is worth a check.

Camera resolution in Zoneminder does not match camera output. Use VLC (Tools, Media Information, Codec) to check camera Display Resolution.

Also, if you are on a server with low RAM use half of the camera resolution to start.
VLC codec info shows 1920 x 1080. ZM set for 1920 x 1080.

Since I am only working with one camera for now, I had the server set for 8GB RAM, but I updated it to 16GB and that did not help.
withanHdammit
Posts: 4
Joined: Tue May 05, 2020 9:59 pm

Re: No live camera view and errors when viewing

Post by withanHdammit »

denvid wrote: Wed May 06, 2020 5:47 pm In the Wiki section "Socket_sendto or no live streaming" I can find the hint:

From console go to Options->Path and make sure PATH_ZMS is set to /zm/cgi-bin/nph-zms.


Where can I find "PATH_ZMS"?

I wasnß t able to find in the web-backend and also not in any config-file.

Thanks!
I'm on a Debian Linux server and that setting is in /etc/zm/conf.d/01-system-paths.conf
shores
Posts: 3
Joined: Sun May 10, 2020 9:09 pm

Re: No live camera view and errors when viewing

Post by shores »

i am having the same issue.
i have a centos 7 install without issues, works fine.
i'm running proxmox 6.1 with ubuntu 20.04 lts container
everything else seems to be working in terms of database, sign in, i left the timezone as UTC, same as the host.
4 gigs of ram and only one motion detect sub stream added at 320x240 resolution.
the source is green, it even shows frames per second, but when you click on it, it only displays the broken image symbol.

the log file says to try installing cambozola, but all the download links i can find are all broken for that software, and i haven't needed to enable and download that for ages using newer browsers.

no firewall running and it does see the stream.
the stream on the camera is set to 320x240 same as ZM.
using VLC, with the exact same URL as what I have for my source, it works fine and plays.

i used the script that said it was for LTS 20/18/16 under the current ubuntu instructions.
the /etc/zm/conf.d/01-system-paths.conf has the proper path.
the /etc/zm/zm-config.conf does not.
which should be setup?

# ZoneMinder url path to the zms streaming server
ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
shores
Posts: 3
Joined: Sun May 10, 2020 9:09 pm

Re: No live camera view and errors when viewing

Post by shores »

please see this report on a second thread.
i turned off auth (everyone should be using auth for security). and the streams work fine
only on ubuntu, mine is 20.04 lts, the other person is 18.04 lts


Everything actually works fine until I turn Authentication on. As soon as I check the box for "OPT_USE_AUTH" under Options>System, I can no longer view the streams. Log entries are below.


Socket /var/run/zm/zms-350482s.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/lat ... window-etc for more information.

getStreamCmdResponse stream error: Socket /var/run/zm/zms-120678s.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/lat ... window-etc for more information.
denvid
Posts: 14
Joined: Thu Jan 10, 2019 10:27 am

Re: No live camera view and errors when viewing

Post by denvid »

I´ve got it working :D
First step, to uncheck in webend: Option => System => OPT_USE_AUTH
Then camera live stream will be able in the web-backend

Second step, check and fix, that timezone on Ubuntu system match with php setting, e.g.:
https://linuxize.com/post/how-to-set-or ... ntu-18-04/

After restart:
service apache2 restart
service zoneminder restart

you might enter the webend without login, then you can check again
Option => System => OPT_USE_AUTH

to enable auth login.
Post Reply