Socket /var/run/zm/zms-958529s.sock does not exist

Forum for questions and support relating to the 1.30.x releases only.
Locked
jasonrennie
Posts: 2
Joined: Tue Jun 12, 2018 2:32 am

Socket /var/run/zm/zms-958529s.sock does not exist

Post by jasonrennie »

I have a Wansview W3. I *think* I have it configured properly. I can see a still image from the camera with http://192.168.1.14/mjpeg/snap.cgi?chn=0. http://localhost/zm/index.php lists the camera; under "FUNCTION" is "Monitor" in green; under "SOURCE" is "ch0" in green. My config is Libvlc with a source path of user:pass@192.168.1.14/live/ch0.

When I try to view the current video by clicking on the name, I get a blank space where the video image should be. When I check the log, I get the socket error pointing me to http://zoneminder.readthedocs.io/en/lat ... window-etc. I think I've done everything it says. When installing, I followed "Easy Way: Ubuntu 16.04". Version reported by getVersion.json is {"version":"1.30.4","apiversion":"1.0"}. Some details of my config:

PATH_ZMS /zm/cgi-bin/nph-zms

$ ls -la /usr/lib/zoneminder/cgi-bin/
total 1244
drwxr-xr-x 2 root root 4096 Jun 9 23:02 .
drwxr-xr-x 3 root root 4096 Jun 9 23:02 ..
lrwxrwxrwx 1 root root 3 May 9 2017 nph-zms -> zms
-rwxr-xr-x 1 root root 1262880 May 9 2017 zms

$ ls -la /var/run/zm/
total 4
drwxr-xr-x 2 www-data www-data 80 Jun 12 22:57 .
drwxr-xr-x 34 root root 1120 Jun 12 17:32 ..
srwxr-xr-x 1 www-data www-data 0 Jun 12 22:08 zmdc.sock
-rw-r--r-- 1 www-data www-data 5 Jun 12 22:08 zm.pid

I can see nph-zms requests in the apache access logs:

::1 - - [12/Jun/2018:22:45:48 -0400] "GET /zm/cgi-bin/nph-zms?mode=jpeg&scale=50&maxfps=5&buffer=1000&monitor=1&connkey=958529&rand=85110 HTTP/1.1" 200 323 "http://localhost/zm/index.php?view=watch&mid=1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36

I don't see any .sock files in /tmp:

$ ls -la /tmp/*.sock
ls: cannot access '/tmp/*.sock': No such file or directory

I have cgi & zoneminder configs enabled for apache:

$ ls -la conf-enabled/
total 8
drwxr-xr-x 2 root root 4096 Jun 10 14:52 .
drwxr-xr-x 8 root root 4096 Apr 19 20:17 ..
lrwxrwxrwx 1 root root 30 Sep 21 2014 charset.conf -> ../conf-available/charset.conf
lrwxrwxrwx 1 root root 40 Sep 25 2016 javascript-common.conf -> ../conf-available/javascript-common.conf
lrwxrwxrwx 1 root root 44 Sep 21 2014 localized-error-pages.conf -> ../conf-available/localized-error-pages.conf
lrwxrwxrwx 1 root root 46 Sep 21 2014 other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.conf
lrwxrwxrwx 1 root root 31 Sep 21 2014 security.conf -> ../conf-available/security.conf
lrwxrwxrwx 1 root root 36 Sep 21 2014 serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf
lrwxrwxrwx 1 root root 33 Jun 10 14:52 zoneminder.conf -> ../conf-available/zoneminder.conf

I have cgi & rewrite mods enabled:

jason@sancerre:/etc/apache2$ ls -la mods-enabled/
[...]
lrwxrwxrwx 1 root root 26 Jun 10 14:53 cgi.load -> ../mods-available/cgi.load
[...]
lrwxrwxrwx 1 root root 30 Jun 10 14:53 rewrite.load -> ../mods-available/rewrite.load

I've restarted apache and zoneminder many times using systemctl.

zmc appears to be running:

$ ps auxw| grep zmc
www-data 14088 0.0 1.0 813652 160524 ? Sl 22:08 0:00 /usr/bin/zmc -m 1

Example full error message from zoneminder logs:

Socket /var/run/zm/zms-571682s.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.

I'm also seeing this in the logs:

Terminating, last frame sent time 1528858634.374207 secs more than maximum of 10.000000

I've looked through old posts and haven't been able to find anything that cures this socket error that I'm seeing. Might I be missing something? Do you have any tips for how I might be able to debug further? Thanks for your time!
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Socket /var/run/zm/zms-958529s.sock does not exist

Post by bbunge »

Socket sendto errors are common and usually a result of the web browser. Switch to ffmpeg if libvlc does not work. for me ffmpeg is much more stable.
Also, check your cameras with VLC to make sure you are using a good resolution. Use VLC (Tools, Media Information, Codec) to check camera Display Resolution.
jasonrennie
Posts: 2
Joined: Tue Jun 12, 2018 2:32 am

Re: [SOLVED] Socket /var/run/zm/zms-958529s.sock does not exist

Post by jasonrennie »

Thanks for the tips! Using rtsp://user:pass@192.168.1.14/live/ch0 with vlc works: I can see live video and it reports resolution as 1280x720 and codec as H264 - MPEG-4 AVC (part 10) (h264)

I had the wrong "Source Path" when I tried ffmpeg earlier. When I switched to rtsp://user:pass@192.168.1.14/live/ch0, it worked like a charm! Thanks!
Locked