zmcontrol not working

Forum for questions and support relating to the 1.25.x releases only.
Locked
athorretto
Posts: 3
Joined: Mon Feb 22, 2010 11:34 pm

zmcontrol not working

Post by athorretto »

Hi All,

i'm having some problems to get properly work the camera control FoscamFI8918W

OS: Ubuntu 11.10
Zm Version: 1.24.4

I followed instructions found here: http://www.zoneminder.com/wiki/index.php/Foscam_FI8918W

I Recieve an error when i push some button on the gui for move the camera but this type of error i think is not the issue.
The real problem can be found in /var/log/zm/zmcontrol.log:

Code: Select all

ZoneMinder::Debug::Fatal('Can\'t connect: File or directory does not exist') called at /usr/bin/zmcontrol.pl line 15                                              
running an strace of zmcontrol i can see that the error is referred to the sock directory: /tmp/zm

Code: Select all

poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "\21\0\0\0\3set autocommit=1", 21) = 21
read(3, "\7\0\0\1\0\0\0\2\0\0\0", 16384) = 11
socket(PF_FILE, SOCK_STREAM, 0)         = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb88dac) = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(4, 0, 0xbfb88df0, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb88dac) = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(4, 0, 0xbfb88df0, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
connect(4, {sa_family=AF_FILE, path="/tmp/zm/zmcontrol-1.sock"}, 110) = -1 ENOENT (No such file or directory)
time(NULL)                              = 1343727472
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {0, 995771137})       = ? ERESTART_RESTARTBLOCK (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
restart_syscall(<... resuming interrupted call ...>) = 0
time(NULL)                              = 1343727473
connect(4, {sa_family=AF_FILE, path="/tmp/zm/zmcontrol-1.sock"}, 110) = -1 ENOENT (No such file or directory)
time(NULL)                              = 1343727473
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, ^C <unfinished ...>
and then it retry giving the same output.

I checked the forum for a solution, also googled.... nothing.
I also tried to update to 1.25.0 with same results.

some details.

Code: Select all

root@zm:/# ls -la  | grep tmp
drwxrwxrwx   5 root     root      4096 2012-07-31 11:39 tmp
root@zm:/# ls -la /tmp
totale 20
drwxrwxrwx  5 root     root     4096 2012-07-31 11:39 .
drwxr-xr-x 23 root     root     4096 2012-07-31 10:04 ..
drwxrwxrwx  2 root     root     4096 2012-07-29 11:51 .ICE-unix
drwxrwxrwx  2 root     root     4096 2012-07-29 11:51 .X11-unix
drwx------  4 www-data www-data 4096 2012-07-31 11:32 zm
root@zm:/#

Code: Select all

root@zm:/tmp/zm# pwd
/tmp/zm
root@zm:/tmp/zm# ls -la
totale 16
drwx------ 4 www-data www-data 4096 2012-07-31 11:32 .
drwxrwxrwx 5 root     root     4096 2012-07-31 11:39 ..
srwxr-xr-x 1 www-data www-data    0 2012-07-31 11:15 zmdc.sock
drwxr-xr-x 2 www-data www-data 4096 2012-07-31 11:32 zmswap-m1
drwxr-xr-x 2 www-data www-data 4096 2012-07-31 10:32 zmswap-m2
root@zm:/tmp/zm#
Anyone can help?

Thanks!
TylerSchwend
Posts: 22
Joined: Sat Nov 05, 2011 11:03 pm

Re: zmcontrol not working

Post by TylerSchwend »

Sorry for the late response... Running 1.24 of ZoneMinder, you need to have the "Debug" line uncommented and make sure there are no "Logger" lines in your control script. It should look like this, (Or have the logger line omitted entirely).

use ZoneMinder::Debug qw(:all);
#use ZoneMinder:Logger qw(:all);
use ZoneMinder::Config qw(:all);
dma_k
Posts: 27
Joined: Sat Jan 19, 2013 5:58 pm

Re: zmcontrol not working

Post by dma_k »

TylerSchwend wrote:Sorry for the late response... Running 1.24 of ZoneMinder, you need to have the "Debug" line uncommented and make sure there are no "Logger" lines in your control script. It should look like this, (Or have the logger line omitted entirely).

use ZoneMinder::Debug qw(:all);
#use ZoneMinder:Logger qw(:all);
use ZoneMinder::Config qw(:all);
I have another information: use ZoneMinder:Logger and comment out ZoneMinder::Debug for ZoneMinder v1.25:

Code: Select all

Can't locate ZoneMinder/Debug.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl) at /usr/share/perl5/ZoneMinder/Control/Foscam.pm line 45.
I think the script /usr/bin/zmcontrol.pl is missing the check for error; something like:

Code: Select all

load "ZoneMinder::Control::$protocol";
if ($@)
 Fatal("Cannot load control module: $@");
Locked