ZoneMinder::Control module broken on ubuntu 12.04 LTS
Posted: Mon Dec 17, 2012 9:06 pm
Hi
I have installed latest version of zoneminder 1.25.x on ubuntu 12.04 LTS however not able to setup the Pan/Tilt controls for the Foscam (or Axis) camera as recommended by gurus in this platform. The errors I am getting from logs are
2012-12-17 20:28:05.284752 web_php 2238 ERR /usr/bin/zmcontrol.pl --autostop --command=moveConRight --id=1=> /usr/share/zoneminder/includes/functions.php 2322
2012-12-17 20:28:05.280410 zmcontrol 3119 FAT Can't connect: No such file or directory zmcontrol.pl
Another user pointed same/similar issue in the forum "http://www.zoneminder.com/forums/viewto ... 29&t=20580" and it is believed that following code is responsible
if ( my $cpid = fork() )
{
logReinit();
# Parent process just sleep and fall through
socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or die( "Can't open socket: $!" );
my $attempts = 0;
while (!connect( CLIENT, $saddr ))
{
$attempts++;
Fatal( "Can't connect: $!" ) if ($attempts > MAX_CONNECT_DELAY);
sleep(1);
}
}
I have debugged the zmcontrol script and found out that although the above code is responsible for generating error however elsif clause of above if condition apparently seems to be the culprit behind this. Above code seems right and falls over after couple of attemps which is the correct behaviour and reason for this is that there is no server side socket where the client can connect.
Although the log says that control server is started after execution of the statement @ line 154 [Info( "Control server $id/$protocol starting at ".strftime( '%y/%m/%d %H:%M:%S', localtime() ) );] but it never passes the line number 158 which is
load "ZoneMinder::Control::$protocol";
I have put the Info statement after the above statement but that Info never got printed. Maybe my finding are not up to the mark however thought to share with experts as this maybe tip of the iceburg. I fail to see what could potentially be changed in Ubuntu 12.04 LTS perl version due to which zmcontrol.pl can not load ZoneMinder:Control module
I have already tried other suggestions such as changing the place of the sockets, changing the permissions of /tmp/zm, adding www-data to adm (brutal and shouldn't be done) and other various permissions under /usr/share/perl5/ZoneMinder etc. but don't think this can be fixed out of the box
Can someone please comment on this? or any clue what else can be tried
Regads,
I have installed latest version of zoneminder 1.25.x on ubuntu 12.04 LTS however not able to setup the Pan/Tilt controls for the Foscam (or Axis) camera as recommended by gurus in this platform. The errors I am getting from logs are
2012-12-17 20:28:05.284752 web_php 2238 ERR /usr/bin/zmcontrol.pl --autostop --command=moveConRight --id=1=> /usr/share/zoneminder/includes/functions.php 2322
2012-12-17 20:28:05.280410 zmcontrol 3119 FAT Can't connect: No such file or directory zmcontrol.pl
Another user pointed same/similar issue in the forum "http://www.zoneminder.com/forums/viewto ... 29&t=20580" and it is believed that following code is responsible
if ( my $cpid = fork() )
{
logReinit();
# Parent process just sleep and fall through
socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or die( "Can't open socket: $!" );
my $attempts = 0;
while (!connect( CLIENT, $saddr ))
{
$attempts++;
Fatal( "Can't connect: $!" ) if ($attempts > MAX_CONNECT_DELAY);
sleep(1);
}
}
I have debugged the zmcontrol script and found out that although the above code is responsible for generating error however elsif clause of above if condition apparently seems to be the culprit behind this. Above code seems right and falls over after couple of attemps which is the correct behaviour and reason for this is that there is no server side socket where the client can connect.
Although the log says that control server is started after execution of the statement @ line 154 [Info( "Control server $id/$protocol starting at ".strftime( '%y/%m/%d %H:%M:%S', localtime() ) );] but it never passes the line number 158 which is
load "ZoneMinder::Control::$protocol";
I have put the Info statement after the above statement but that Info never got printed. Maybe my finding are not up to the mark however thought to share with experts as this maybe tip of the iceburg. I fail to see what could potentially be changed in Ubuntu 12.04 LTS perl version due to which zmcontrol.pl can not load ZoneMinder:Control module
I have already tried other suggestions such as changing the place of the sockets, changing the permissions of /tmp/zm, adding www-data to adm (brutal and shouldn't be done) and other various permissions under /usr/share/perl5/ZoneMinder etc. but don't think this can be fixed out of the box
Can someone please comment on this? or any clue what else can be tried
Regads,