Error socket_sendto ( /var/run/zm/zms-347773s.sock) failed

Forum for questions and support relating to the 1.25.x releases only.
eskhool
Posts: 1
Joined: Fri Mar 15, 2013 2:20 pm

Error socket_sendto ( /var/run/zm/zms-347773s.sock) failed

Post by eskhool » Fri Mar 15, 2013 2:34 pm

Basically my syslog (and web_php.log created by the apache zoneminder cgi-bin) shows

03/12/13 17:42:20.307107 web_php[5514].ERR [socket_sendto( /var/run/zm/zms-347773s.sock ) failed: No such file or directory] at /usr/share/zoneminder/includes/functions.php line 2322
When I look at /var/run/zm

srwxr-xr-x 1 www-data www-data 0 Mar 12 17:42 zmdc.sock
-rw-r--r-- 1 www-data www-data 5 Mar 12 17:42 zm.pid
srwxr-xr-x 1 www-data www-data 0 Mar 13 18:01 zms-347773w.sock
Note the w vs the s in the socket file name. Any ideas as to why the s file is not getting created.

My configuration is:
Ubuntu Precise 12.04
Zoneminder (from ubuntu official repositories) 1.25.0
Apache 2.2.22
Php 5.3.10

tubal-cain
Posts: 1
Joined: Wed Mar 20, 2013 8:14 pm

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by tubal-cain » Wed Mar 20, 2013 8:16 pm

Hi i'm having the same issue, the only diference is that im using the virtual machine that you guys provide in Downloads.

ctimbrell
Posts: 27
Joined: Thu Apr 19, 2012 6:36 pm

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by ctimbrell » Sat Mar 30, 2013 7:12 pm

Has anyone solved the error socket_sendto issue as i am having the same problem

paulbuk
Posts: 6
Joined: Sat Mar 30, 2013 9:12 pm

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by paulbuk » Fri Apr 12, 2013 10:21 pm

The socket files that end with a 's' or a 'w' are to do with streaming. They are created by the call to cgi program zms or nph-zms. The error you are seeing comes from stream.php where it check for existence of the socket files before continuing to process the stream. Given the files are not being created - the could be a problem with the cgi setup - I had similar messages on ubuntu server 12.10 under lighttpd until I correctly enable the CGI module to treat zms as a cgi program. Once this was corrected, the socket files were created and the message stopped.

michael smith
Posts: 49
Joined: Wed Mar 14, 2007 12:58 pm
Contact:

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by michael smith » Fri Apr 19, 2013 2:25 pm

what did you actually edit? the CGI paths??
Cheers
Michael

maxrpi
Posts: 6
Joined: Wed Apr 24, 2013 9:18 am

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by maxrpi » Fri Apr 26, 2013 9:45 am

hi,
i had the same issue. i've changed row 51 @ajax/stream.php, incresing sleep(1)-->sleep(2). It worked for me

hope this helps
max

xuanxoan
Posts: 1
Joined: Thu May 23, 2013 9:34 am

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by xuanxoan » Thu May 23, 2013 9:40 am

Hi,
I had same issus:
socket_sendto( /tmp/zm/zms-042615s.sock ) failed: No such file or directory
And i check /tm/zm have only file: zmdc.sock
Pls show me how fix it? where is stream.php? I istalled in Centos 5.7. Thanks,

maxrpi
Posts: 6
Joined: Wed Apr 24, 2013 9:18 am

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by maxrpi » Thu May 23, 2013 9:01 pm

hi,
the stream.php file is located @

/usr/share/zoneminder/ajax/

@ line 50 there should something like this

Code: Select all


while ( !file_exists($remSockFile) && $max_socket_tries-- ) //sometimes we are too fast for our own good, if it hasn't been setup yet give it a second.
    sleep(2); //rise it to 2 seconds to get rid of socket_sendto error


i've changed the value for the sleep statement (from 1 to 2 secs)

cheers
max

foldedhome
Posts: 8
Joined: Wed May 22, 2013 7:46 pm

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by foldedhome » Thu May 30, 2013 10:40 pm

you seem to have the samer issue that i have in that the files generated are zms******w.sock name in the directory yet zoneminder seems to be trying to find a file named zms******s.sock.

does the differant filename stop this working and how can i set it so that the file generated is the same as the file it is looking for.

i increased the sleep time to 2 seconds and it made no differance to my system.

paxxor
Posts: 1
Joined: Fri May 31, 2013 2:37 am

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by paxxor » Fri May 31, 2013 2:44 am

Same error here but I think I've tracked down the reason why but not sure how to fix.

My setup is on a solid state drive with a larger raid array for file storage. With the SSD I can't have events saved to the default location or it will fill it up in sort order. So I set the events folder to some palce other than the default location and I can't stream events. When I flip it back to the default location I can.

it seems somewhere the location is hard coded and if you made changes in the options, it breaks things.

log file:

Can't open /var/www/html/zm//home/zmfiles/events/1/13/05/30/21/54/20/001-capture.jpg: No such file or directory


seems to confirm the path for events set somewhere else other than the options.

EspenT
Posts: 1
Joined: Sun Jun 02, 2013 10:13 pm

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by EspenT » Sun Jun 02, 2013 10:22 pm

Hmm..

As someone mentioned before me there are two lines in stream.php that are slightly different.


$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'w.sock';
and
$remSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';

I changed both to have the s.sock

$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';
and
$remSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';

After that a image from my PS3_EYE is now shown. Hower it looks like shit, and I will look more into that. Also I have a new error now.
web_php[16046]: ERR [Got unexpected message size, got 5, expected 260]

foldedhome
Posts: 8
Joined: Wed May 22, 2013 7:46 pm

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by foldedhome » Wed Jun 05, 2013 9:38 am

hi

i modified the file and changed both to s.sock.
i am still not able to view stored events.
i no longer get the sock error but now also get the web_php[16046]: ERR [Got unexpected message size, got 5, expected 260].

User avatar
teraquad
Posts: 90
Joined: Fri Mar 09, 2012 2:03 pm
Location: New Bern, NC
Contact:

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by teraquad » Tue Jun 11, 2013 12:21 pm

Hi,

I to have the "socket_sendto( /var/lib/zoneminder/sock/zms-642937s.sock ) failed: No such file or directory" problem. I would like to solve it. So i am folowing this thread. In hopes it will come to a suitable solution.

Thanks for the post.
Fedora 23, ZM 1.28
N4ZPO (ham Radio)
8)

DudeBud
Posts: 5
Joined: Sun Jun 30, 2013 8:13 pm

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by DudeBud » Sun Jun 30, 2013 10:08 pm

Yeah, same issue here guys....

changing the w.sock to s.sock does nothing but create more errors.... :(

GAH!!

gjdunga
Posts: 5
Joined: Wed Jul 03, 2013 10:21 am

Re: Error socket_sendto ( /var/run/zm/zms-347773s.sock) fail

Post by gjdunga » Thu Jul 04, 2013 1:59 am

Greetings,

I'm having the same kind of sock issues, but it seems to be related on how I address the server..

See http://www.zoneminder.com/forums/viewto ... 29&t=21139 for a description..
(I created a different thread as not to spam/hijack this thread...)

Gabriel

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests