Page 1 of 2

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

Posted: Fri Mar 15, 2013 2:34 pm
by eskhool
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

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

Posted: Wed Mar 20, 2013 8:16 pm
by tubal-cain
Hi i'm having the same issue, the only diference is that im using the virtual machine that you guys provide in Downloads.

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

Posted: Sat Mar 30, 2013 7:12 pm
by ctimbrell
Has anyone solved the error socket_sendto issue as i am having the same problem

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

Posted: Fri Apr 12, 2013 10:21 pm
by paulbuk
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.

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

Posted: Fri Apr 19, 2013 2:25 pm
by michael smith
what did you actually edit? the CGI paths??
Cheers
Michael

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

Posted: Fri Apr 26, 2013 9:45 am
by maxrpi
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

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

Posted: Thu May 23, 2013 9:40 am
by xuanxoan
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,

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

Posted: Thu May 23, 2013 9:01 pm
by maxrpi
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

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

Posted: Thu May 30, 2013 10:40 pm
by foldedhome
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.

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

Posted: Fri May 31, 2013 2:44 am
by paxxor
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.

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

Posted: Sun Jun 02, 2013 10:22 pm
by EspenT
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]

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

Posted: Wed Jun 05, 2013 9:38 am
by foldedhome
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].

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

Posted: Tue Jun 11, 2013 12:21 pm
by teraquad
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.

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

Posted: Sun Jun 30, 2013 10:08 pm
by DudeBud
Yeah, same issue here guys....

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

GAH!!

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

Posted: Thu Jul 04, 2013 1:59 am
by gjdunga
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