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

Forum for questions and support relating to the 1.24.x releases only.
Locked
brandonegbert
Posts: 2
Joined: Tue Nov 09, 2010 3:29 pm

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

Post 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.
Mika
Posts: 19
Joined: Fri Nov 05, 2010 6:57 pm

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

Post 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
Mika
Posts: 19
Joined: Fri Nov 05, 2010 6:57 pm

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

Post 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
brandonegbert
Posts: 2
Joined: Tue Nov 09, 2010 3:29 pm

Post 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.
jebba
Posts: 5
Joined: Mon May 17, 2010 6:16 am
Location: Redstone Canyon, Colorado

Post 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()) );
 }
lrossi
Posts: 1
Joined: Wed Feb 02, 2011 6:03 am

Post 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.
Locked