Problem with socket_sendto mismatch?

Forum for questions and support relating to the 1.28.x releases only.
Locked
cdekievit
Posts: 1
Joined: Sun Jul 19, 2015 12:51 pm

Problem with socket_sendto mismatch?

Post by cdekievit »

Hi, and thanks in advance for any help given.

After making some updates to zoneminder configuration (through the web) I restarted the service and I'm now getting issues presenting in the /var/log/syslog.

Here's a sample of the issue:
Jul 19 22:48:53 plovercentral web_php[27328]: ERR [socket_sendto( /var/run/zm/zms-089690s.sock ) failed: No such file or directory]
Jul 19 22:49:03 plovercentral web_php[27310]: ERR [socket_sendto( /var/run/zm/zms-089690s.sock ) failed: No such file or directory]
Jul 19 22:49:11 plovercentral zmc_m1[18443]: INF [Front-Left: 11000 - Capturing at 12.66 fps]
Jul 19 22:49:13 plovercentral web_php[27299]: ERR [socket_sendto( /var/run/zm/zms-089690s.sock ) failed: No such file or directory]
Jul 19 22:49:14 plovercentral zma_m1[18485]: INF [Front-Left: 11000 - Processing at 12.50 fps]
Jul 19 22:49:53 plovercentral web_php[27417]: ERR [socket_sendto( /var/run/zm/zms-089690s.sock ) failed: No such file or directory]
Jul 19 22:50:04 plovercentral web_php[27366]: ERR [socket_sendto( /var/run/zm/zms-089690s.sock ) failed: No such file or directory]
Jul 19 22:50:24 plovercentral web_php[27322]: ERR [socket_sendto( /var/run/zm/zms-089690s.sock ) failed: No such file or directory]
Jul 19 22:50:31 plovercentral zmc_m1[18443]: INF [Front-Left: 12000 - Capturing at 12.50 fps]
Jul 19 22:50:34 plovercentral zma_m1[18485]: INF [Front-Left: 12000 - Processing at 12.50 fps]
Jul 19 22:50:44 plovercentral web_php[27372]: ERR [socket_sendto( /var/run/zm/zms-814210s.sock ) failed: No such file or directory]
Jul 19 22:50:54 plovercentral web_php[27674]: ERR [socket_sendto( /var/run/zm/zms-089690s.sock ) failed: No such file or directory]
root@plovercentral:/var/run/zm# ls -al /var/run/zm
total 4
drwxr-xr-x 2 www-data www-data 100 Jul 19 22:50 .
drwxr-xr-x 23 root root 760 Jul 19 11:06 ..
srwxr-xr-x 1 www-data www-data 0 Jul 19 22:34 zmdc.sock
-rw-r--r-- 1 www-data www-data 5 Jul 19 22:34 zm.pid
srwxr-xr-x 1 www-data www-data 0 Jul 19 22:50 zms-089690w.sock
As you can see, the web_php process is trying to send to socket zms-089690s.sock, but in the /var/run/zm directory is the same number, but a w instead. Is this a mismatch, or is the equivalent s sock just not being created. This seems to be causing issues with accessing zoneminder on the web (which was fine before).

I've restarted both apache2 and zoneminder services in varying orders, and the issue doesn't seem to be going away. cgi is enabled in apache2 and everything was up and running perfectly before the service restart.

Further information: I'm running zoneminder 1.28.1 (just installed from the PPA) on Ubuntu Trusty and there don't appear to be any updates available. This was all working fine not long ago. The only reason I restarted was that I was difficulty getting background filters to fire (manually executing an email filter was working well from the web).

Any ideas?

Thanks Again, Christian.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Problem with socket_sendto mismatch?

Post by knight-of-ni »

That isn't a mismatch. ZoneMinder needs two sockets, one has an "s" and the other has a "w".

The most common cause to socket_sendto errors is a misconfigured Apache configuration.
This is further reinforced by the message "capturing at" in your logs. This tells you that your backend is working/recording just fine. The problem is the frontend trying to create a stream to your client.

Another clue is the comment stating you changed some settings around. Verify you did not change the value of ZM_PATH_ZMS. That value has to match what Apache expects. On Ubuntu, I believe this variable should be "/cgi-bin/nph-zms".
That will cause the issue you are experiencing.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
stlth
Posts: 12
Joined: Wed Mar 23, 2011 10:43 pm

Re: Problem with socket_sendto mismatch?

Post by stlth »

Hi, I also have similar problem.

My config (server is not doing other tasks):

AMD FX(tm)-6300 Six-Core Processor
8GB RAM
Fresh Debian Jessie install

Zoneminder version:
Package: zoneminder
New: yes
State: installed
Automatically installed: no
Version: 1.28.0+nmu1
Priority: optional
Section: metapackages
Maintainer: Isaac Connor

I have 4 USB 640x480 cameras. They working very well with simpler software 'motion' for past few years but now I need more sophisticated CCTV system like Zoneminder.

Now I have configured all four sources as "Record" and it's recording very well, I can view live streams, even in montage view. But log is always red and talking some like this all the time:

Code: Select all

Date/Time
Component	PID	Level	Message	File	Line
2015-07-24 15:28:10.499259	web_php	7511	ERR	socket_sendto( /var/run/zm/zms-766520s.sock ) failed: No such file or directory	/usr/share/zoneminder/includes/functions.php	2342
2015-07-24 15:28:10.497096	web_php	9866	ERR	socket_sendto( /var/run/zm/zms-964598s.sock ) failed: No such file or directory	/usr/share/zoneminder/includes/functions.php	2342
2015-07-24 15:28:05.909233	zmc_dvideo2	10142	INF	Wyjazd: 42000 - Capturing at 15.15 fps	zm_monitor.cpp	2926
2015-07-24 15:28:00.449678	web_php	9861	ERR	socket_sendto( /var/run/zm/zms-665969s.sock ) failed: No such file or directory	/usr/share/zoneminder/includes/functions.php	2342
2015-07-24 15:27:57.647262	web_php	9978	ERR	socket_sendto( /var/run/zm/zms-766520s.sock ) failed: No such file or directory	/usr/share/zoneminder/includes/functions.php	2342
2015-07-24 15:27:57.598047	web_php	9861	ERR	socket_sendto( /var/run/zm/zms-964598s.sock ) failed: No such file or directory	/usr/share/zoneminder/includes/functions.php	2342
2015-07-24 15:27:57.146334	zma_m1	10087	INF	Parking: 42000 - Processing at 14.71 fps	zm_monitor.cpp	1179
2015-07-24 15:27:50.648067	zmc_dvideo1	10106	INF	Wjazd: 42000 - Capturing at 14.93 fps	zm_monitor.cpp	2926
2015-07-24 15:27:47.759825	web_php	9861	ERR	socket_sendto( /var/run/zm/zms-665969s.sock ) failed: No such file or directory	/usr/share/zoneminder/includes/functions.php	2342
2015-07-24 15:27:45.506885	web_php	9471	ERR	socket_sendto( /var/run/zm/zms-766520s.sock ) failed: No such file or directory	/usr/share/zoneminder/includes/functions.php	2342
2015-07-24 15:27:45.139577	web_php	9861	ERR	socket_sendto( /var/run/zm/zms-964598
In the config tab "Paths" i have something like this:

PATH_ZMS = /cgi-bin/nph-zms

What should I do?
Locked