Page 1 of 1

"socket_sendto( /tmp/zms-713662s.sock ) failed" er

Posted: Tue Nov 09, 2010 3:37 pm
by brandonegbert

Code: Select all

[Tue Nov 09 10:23:13 2010] [error] [client 10.80.5.112] socket_sendto( /tmp/zms-926392s.sock ) failed: No such file or directory, referer: http://cape-zm2/zm/index.php?view=watch&mid=1
[Tue Nov 09 10:23:13 2010] [error] [client 10.80.5.112] array (\n  0 => \n  array (\n    'file' => '/var/www/html/zm/ajax/stream.php',\n    'line' => 55,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /tmp/zms-926392s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n   array (\n    'file' => '/var/www/html/zm/index.php',\n    'line' => 116,\n    'args' => \n    array (\n     0 => '/var/www/html/zm/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://cape-zm2/zm/index.php?view=watch&mid=1
I've been trying to troubleshoot this issue for a while to get mpeg streaming functioning from some IP cameras and I've pretty much exhausted my resources and would appreciate any assistance.

Running centos 5.5 32-bit and Zoneminder 1.24.2. Mostly followed the CentOS guide on the wiki with some deviation (http://www.zoneminder.com/wiki/index.php/CentOS). I've investigated most other errors or warnings I've received I believe that this socket error is the culprit. If anyone has any recommendations on how to resolve it they would be greatly appreciated.

Re: "socket_sendto( /tmp/zms-713662s.sock ) failed"

Posted: Thu Nov 11, 2010 7:38 pm
by Mika
brandonegbert wrote:

Code: Select all

[Tue Nov 09 10:23:13 2010] [error] [client 10.80.5.112] socket_sendto( /tmp/zms-926392s.sock ) failed: No such file or directory, referer: http://cape-zm2/zm/index.php?view=watch&mid=1
[Tue Nov 09 10:23:13 2010] [error] [client 10.80.5.112] array (\n  0 => \n  array (\n    'file' => '/var/www/html/zm/ajax/stream.php',\n    'line' => 55,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /tmp/zms-926392s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n   array (\n    'file' => '/var/www/html/zm/index.php',\n    'line' => 116,\n    'args' => \n    array (\n     0 => '/var/www/html/zm/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://cape-zm2/zm/index.php?view=watch&mid=1
I've been trying to troubleshoot this issue for a while to get mpeg streaming functioning from some IP cameras and I've pretty much exhausted my resources and would appreciate any assistance.

Running centos 5.5 32-bit and Zoneminder 1.24.2. Mostly followed the CentOS guide on the wiki with some deviation (http://www.zoneminder.com/wiki/index.php/CentOS). I've investigated most other errors or warnings I've received I believe that this socket error is the culprit. If anyone has any recommendations on how to resolve it they would be greatly appreciated.
I have this error too, news?

I have Ubuntu Desktop 10.10 with zoneminder 1.24.2
thx

Re: "socket_sendto( /tmp/zms-713662s.sock ) failed"

Posted: Thu Nov 11, 2010 7:58 pm
by Mika
brandonegbert wrote:

Code: Select all

[Tue Nov 09 10:23:13 2010] [error] [client 10.80.5.112] socket_sendto( /tmp/zms-926392s.sock ) failed: No such file or directory, referer: http://cape-zm2/zm/index.php?view=watch&mid=1
[Tue Nov 09 10:23:13 2010] [error] [client 10.80.5.112] array (\n  0 => \n  array (\n    'file' => '/var/www/html/zm/ajax/stream.php',\n    'line' => 55,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /tmp/zms-926392s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n   array (\n    'file' => '/var/www/html/zm/index.php',\n    'line' => 116,\n    'args' => \n    array (\n     0 => '/var/www/html/zm/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://cape-zm2/zm/index.php?view=watch&mid=1
I've been trying to troubleshoot this issue for a while to get mpeg streaming functioning from some IP cameras and I've pretty much exhausted my resources and would appreciate any assistance.

Running centos 5.5 32-bit and Zoneminder 1.24.2. Mostly followed the CentOS guide on the wiki with some deviation (http://www.zoneminder.com/wiki/index.php/CentOS). I've investigated most other errors or warnings I've received I believe that this socket error is the culprit. If anyone has any recommendations on how to resolve it they would be greatly appreciated.
Ok, i fix it, see my post: http://www.zoneminder.com/forums/viewto ... 5748#65748

Thx

Posted: Fri Nov 12, 2010 2:58 pm
by brandonegbert
That helped a little biit. The video works occasionally now but sometimes will not start and sometimes freezes after playing for a few seconds.

It seems that increasing the retries doesn't fix the issue but just covers it up.

Posted: Mon Nov 15, 2010 3:15 pm
by jebba
Try patching /usr/share/zoneminder/www/ajax/stream.php thusly:

Code: Select all

--- stream.php.orig     2010-11-11 20:40:51.000000000 -0700
+++ stream.php  2010-11-14 19:31:09.130300248 -0700
@@ -12,10 +12,10 @@
 {
     ajaxError( "socket_create() failed: ".socket_strerror(socket_last_error()) );
 }
-$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'w.sock';
+$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';
 if ( !@socket_bind( $socket, $locSockFile ) )
 {
-    ajaxError( "socket_bind( $lockSockFile ) failed: ".socket_strerror(socket_last_error()) );
+    ajaxError( "socket_bind( $locSockFile ) failed: ".socket_strerror(socket_last_error()) );
 }

Posted: Thu Feb 03, 2011 5:17 pm
by lrossi
jebba wrote:Try patching /usr/share/zoneminder/www/ajax/stream.php thusly:

Code: Select all

--- stream.php.orig     2010-11-11 20:40:51.000000000 -0700
+++ stream.php  2010-11-14 19:31:09.130300248 -0700
@@ -12,10 +12,10 @@
 {
     ajaxError( "socket_create() failed: ".socket_strerror(socket_last_error()) );
 }
-$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'w.sock';
+$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';
 if ( !@socket_bind( $socket, $locSockFile ) )
 {
-    ajaxError( "socket_bind( $lockSockFile ) failed: ".socket_strerror(socket_last_error()) );
+    ajaxError( "socket_bind( $locSockFile ) failed: ".socket_strerror(socket_last_error()) );
 }

I'm no expert, and I'm new to this code. However, I think the above change from w.sock to s.sock may not be correct.

I was getting the same symptom (no such file or directory on the w.sock file) and the problem was that the zms process was not executing, because my Apache installation didn't know to allow CGI in this directory.

I ended up following the advice here: http://www.zoneminder.com/forums/viewtopic.php?t=15248 and configured CGI to work in the zoneminder's cgi-bin directory. That solved my problem.

It looks like there are other reasons zms my not execute in addition to CGI problems:
- permissions on zms
- wrong path in the PATH_ZMS configuration variable

I think the other change, regarding lockSockFile changing to locSockFile, looks like a real fix.