Socket issue

Forum for questions and support relating to the 1.29.x releases only.
Locked
kjakman
Posts: 3
Joined: Wed May 31, 2017 3:32 pm

Socket issue

Post by kjakman »

Hi,

I have been struggling with the error:

ERR [socket_sendto( /var/run/zm/zms-101732s.sock ) failed: No such file or directory],

for two days, and eventually gave up on the smaller server, and did a fresh of install of 1.29 on a fresh Ubuntu 16.04 with 4GB memory, as per
wiki.zoneminder.com/Ubuntu_Server_16.04_64-bit_with_Zoneminder_1.29.0_the_easy_way

It briefly worked (I could see a live stream from my Foscam FI9853EP), but now the error is back, and I did not change anything in the meantime.

I'm completely stumped. Turned off UFW just in case. Added 8GB swap.

My PATH_ZMS is /zm/cgi-bin/nph-zms
My zoneminder.conf is

Code: Select all

ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
</Directory>

Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
  php_flag register_globals off
  Options -Indexes +FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>

<Directory /usr/share/zoneminder/www/api>
  AllowOverride All
</Directory>
In the system log, I see:

Code: Select all

May 31 15:52:32 zm zmc_m1[7101]: INF [Foscam: 55000 - Capturing at 14.93 fps]
May 31 15:53:11 zm zmdc[7074]: WAR [Can't find process with command of 'zma -m 1']
May 31 15:53:12 zm zmdc[7074]: INF ['zmc -m 1' sending stop to pid 7101 at 17/05/31 15:53:12]
May 31 15:53:12 zm zmc_m1[7101]: INF [Got signal 15 (Terminated), exiting]
May 31 15:53:12 zm zmdc[7074]: INF ['zmc -m 1' exited normally]
May 31 15:53:12 zm zmwatch[7114]: INF [Restarting capture daemon for Foscam, shared data not valid]
May 31 15:53:12 zm zmdc[8190]: INF ['zmc -m 1' started at 17/05/31 15:53:12]
May 31 15:53:12 zm zmdc[7074]: INF ['zmc -m 1' starting at 17/05/31 15:53:12, pid = 8190]
May 31 15:53:12 zm undef[8190]: INF [No Server ID or Name specified in config.  Not using Multi-Server Mode.]
May 31 15:53:12 zm zmdc[7074]: WAR [Can't find process with command of 'zma -m 1']
May 31 15:53:12 zm zmdc[7074]: INF ['zmc -m 1' sending stop to pid 8190 at 17/05/31 15:53:12]
May 31 15:53:12 zm zmdc[7074]: INF ['zmc -m 1' exited, signal 14]
May 31 15:53:12 zm zmdc[7074]: INF [Starting pending process, zmc -m 1]
May 31 15:53:12 zm zmdc[7074]: INF ['zmc -m 1' starting at 17/05/31 15:53:12, pid = 8195]
May 31 15:53:12 zm zmdc[8195]: INF ['zmc -m 1' started at 17/05/31 15:53:12]
May 31 15:53:12 zm undef[8195]: INF [No Server ID or Name specified in config.  Not using Multi-Server Mode.]
May 31 15:53:13 zm zmc_m1[8195]: INF [Starting Capture version 1.29.0]
May 31 15:53:13 zm zmc_m1[8195]: INF [Priming capture from rtsp://kjetil:kjetil2@31.151.115.78:88/videoMain]
May 31 15:53:24 zm undef[8209]: INF [No Server ID or Name specified in config.  Not using Multi-Server Mode.]
May 31 15:53:24 zm zms[8209]: ERR [Unable to authenticate user]
May 31 15:53:24 zm undef[8210]: INF [No Server ID or Name specified in config.  Not using Multi-Server Mode.]
May 31 15:53:24 zm zms[8210]: ERR [Unable to authenticate user]
May 31 15:53:30 zm web_php[7245]: ERR [socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory]
May 31 15:53:30 zm web_php[7245]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory - checkStreamForErrors()]
May 31 15:53:42 zm web_php[7515]: ERR [socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory]
May 31 15:53:42 zm web_php[7515]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory - checkStreamForErrors()]
May 31 15:53:54 zm web_php[7642]: ERR [socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory]
May 31 15:53:54 zm web_php[7642]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory - checkStreamForErrors()]
May 31 15:54:06 zm web_php[7221]: ERR [socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory]
May 31 15:54:06 zm web_php[7221]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory - checkStreamForErrors()]
May 31 15:54:18 zm web_php[7171]: ERR [socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory]
May 31 15:54:18 zm web_php[7171]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory - checkStreamForErrors()]
May 31 15:54:20 zm zmc_m1[8195]: INF [Foscam: 1000 - Capturing at 14.93 fps]
May 31 15:54:30 zm web_php[7243]: ERR [socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory]
May 31 15:54:30 zm web_php[7243]: ERR [getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory - checkStreamForErrors()]
(Yes, the camera username/password is correct)

Apache Log:

Code: Select all

[Wed May 31 15:44:49.945514 2017] [:error] [pid 7169] [client 31.151.115.78:49789] INF [Login successful for user "admin"]
[Wed May 31 15:50:29.609665 2017] [:error] [pid 7169] [client 31.151.115.78:49893] ERR [socket_sendto( /var/run/zm/zms-593486s.sock ) failed: No such file or directory], referer: http://178.62.197.193/zm/index.php?view=watch&mid=1
[Wed May 31 15:50:41.703752 2017] [:error] [pid 7892] [client 31.151.115.78:49896] ERR [socket_sendto( /var/run/zm/zms-593486s.sock ) failed: No such file or directory], referer: http://178.62.197.193/zm/index.php?view=watch&mid=1
[Wed May 31 15:53:30.468856 2017] [:error] [pid 7245] [client 31.151.115.78:49960] ERR [socket_sendto( /var/run/zm/zms-852181s.sock ) failed: No such file or directory], referer: http://178.62.197.193/zm/index.php?view=watch&mid=1
I see sockets appearing and disappearing, but still get the error, and no live stream.

Code: Select all

root@zm:/var/log# ls -l /var/run/zm
srwxr-xr-x 1 www-data www-data 0 May 31 14:51 zmdc.sock
-rw-r--r-- 1 www-data www-data 4 May 31 14:51 zm.pid
-rw-r--r-- 1 www-data root     0 May 31 15:24 zms-080394s.sock
My camera settings are good, I did briefly see the live stream.
I've started and stopped the service (starting zoneminder first, then apache)

I've read all the documentation and forums I could find, but completely stuck. Any input is much appreciated.

-- Kjetil
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Socket issue

Post by bbunge »

Socket sendto errors are not an indication that something is wrong in your system. I see them all the time when several are viewing montage at the same time. Restart your web browser or refresh the browser window. I have my users set up on Firefox with an add on called Refresh Every that I have set to refresh the window every 5 minutes.

So, for the most part you can ignore socket sendto errors if everything else is working. And you may be better off upgrading to ZM 1.30.4.
kjakman
Posts: 3
Joined: Wed May 31, 2017 3:32 pm

Re: Socket issue

Post by kjakman »

Thank you for your reply. It is an issue however, because I cannot see the video stream.
I started out with 1.30.4 on the first server with less memory, same issue, which is why I tried a fresh install with 1.29
I just upgraded to 1.30.4 on the new server, still no stream visible, with this in the log:

Code: Select all

[Thu Jun 01 06:58:26.149924 2017] [:error] [pid 27038] [client 31.151.115.78:52312] ERR [Socket /var/run/zm/zms-987392s.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.], referer: http://178.62.197.193/zm/index.php?view=watch&mid=1
[Thu Jun 01 06:58:38.193138 2017] [:error] [pid 27037] [client 31.151.115.78:52314] ERR [Socket /var/run/zm/zms-987392s.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.], referer: http://178.62.197.193/zm/index.php?view=watch&mid=1
CGI is enabled in apache and check the PATH_ZMS is set correctly.

I've tried with two other cameras following exact instructions as per wiki, same issue.
Not sure how to troubleshoot further...

Thanks, Kjetil
kjakman
Posts: 3
Joined: Wed May 31, 2017 3:32 pm

Re: Socket issue

Post by kjakman »

Update: I saw "Error, unable to authenticate user" when using zmNinja, and changed AUTH_RELAY to "none"
as per github.com/ZoneMinder/ZoneMinder/issues/1552

Not sure if it's related, but atm the stream is working in zmNinja as well as all browers simultaneously (Chrome, Safari, FF)

Thanks, Kjetil
Locked