Page 1 of 1

zmdc Can't bind: No such file or directory

Posted: Sun Jan 16, 2011 9:24 pm
by jani
Hello

I have had set up a vivotek ip camera within the same LAN network with latest Zoneminder from SVN and works great. However, I would like to use this ip camera where no other Zoneminder installed, just the ip camera can be reached thru. web like http://camerahost/video.jpg so the camera and the server where Zoneminder installed is not in the same network.
Of course when I try to probe the camera from ZM admin (arp -a) will not detect the camera. Without probing the camera I get the following in the syslog since zmdc.sock is not present in /tmp/zm/ folder.

Jan 16 21:37:17 ubuntu zmdc[10202]: INF [Server starting at 11/01/16 21:37:17]
Jan 16 21:37:19 ubuntu zmdc[10202]: FAT [Can't bind: No such file or directory]
Jan 16 21:37:27 ubuntu zmdc[10201]: FAT [Can't connect: No such file or directory]

Is it possible to set up Zoneminder thru WAN to reach a remote IP camera data directly or must I get the data from another remote Zoneminder?

Thanks for answers.

Posted: Mon Jan 17, 2011 11:35 am
by jani
Found the solution to my problem. On ubuntu 10.10 /tmp folder gets cleared and /tmp/zm folder is deleted. The zmdc.pl script could not create zmdc.sock because non-existent target folder. Other thing related to php exec: must specify full path to 'arp' command because exec will return error 127.

FAT [Can't bind ] | Unable to run zmdc.pl on Ubuntu 10.10+

Posted: Thu Feb 17, 2011 11:44 am
by LuizCB
Hi Jani

- zm (Checked out revision 3302)
- Natty (Alpha 2) [*][/b]

I have the exact same issue,

Code: Select all

Feb 17 00:07:58 srvr zmpkg[5773]: INF [Command: start]
Feb 17 00:07:58 srvr zmdc[5783]: INF [Server starting at 11/02/17 00:07:58]
Feb 17 00:08:00 srvr zmdc[5783]: FAT [Can't bind: No such file or directory]
Feb 17 00:08:08 srvr zmdc[5782]: FAT [Can't connect: No such file or directory]
Feb 17 00:08:08 srvr zmpkg[5773]: ERR [Unable to run "sudo -u www-data /usr/local/bin/zmdc.pl startup", output is "Starting server"]

did you manage to solve yours? How? At Zoneminder compiling level or changing Ubuntu standard configurations?

I'm trying to dig more on this.

Regards,
Luiz

[*] [/b]Linux version 2.6.38-3-generic-pae (buildd@roseapple) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-2ubuntu2) ) #30-Ubuntu SMP Thu Feb 10 00:54:59 UTC 2011

Posted: Sat Mar 05, 2011 4:45 pm
by mastertheknife
I just had same problem.

As root type this:

Code: Select all

mkdir /tmp/zm
chown apache:apache -R /tmp/zm
Change apache:apache to the user:group your apache runs at, it might be www-data on some distros (like yours). This is needed because the zmdc.pl start command is being ran by apache, you can tell this by "sudo -u apache zmdc.pl start"

mastertheknife

Posted: Sat Mar 05, 2011 5:11 pm
by mastertheknife
Here is a patch to avoid it happening again:

Code: Select all

--- a/scripts/zmdc.pl.in
+++ b/scripts/zmdc.pl.in
@@ -131,6 +131,9 @@ foreach my $arg ( @ARGV )
        }
 }
 
+# Create the directory first if it doesn't exist
+mkdir(ZM_PATH_SOCKS);
+
 socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or Fatal( "Can't open socket: $!" );
 
 my $saddr = sockaddr_un( SOCK_FILE );
mastertheknife :D