Page 1 of 1

zmtrigger.pl configuration

Posted: Sun Jun 03, 2012 3:11 am
by coinageboy
Hi,

I am trying to use external trigger from Axis 211A to zmtrigger.pl runing Ubuntu server 64 12.04.

zmtrigger.pl is running but the Axis camera test to connect shows following error:

Connection failed:
502 Bad Gateway
The CGI was not CGI/1.1 compliant.

I tried to connect from another machine using telnet, port 6802 and it connects fine.

Also, zmtrigger.pl sometimes exits with following message:

variable is not a string at /usr/share/perl5/ZoneMinder/Memory/Mapped.pm line 109.

Any ideas??

Re: zmtrigger.pl configuration

Posted: Thu Jun 28, 2012 12:49 pm
by Classic
You have to compile zm without mmap...thats work for me.

Re: zmtrigger.pl configuration

Posted: Thu Jun 28, 2012 9:45 pm
by Lourenco
coinageboy wrote:Hi,

I am trying to use external trigger from Axis 211A to zmtrigger.pl runing Ubuntu server 64 12.04.

zmtrigger.pl is running but the Axis camera test to connect shows following error:

Connection failed:
502 Bad Gateway
The CGI was not CGI/1.1 compliant.

I tried to connect from another machine using telnet, port 6802 and it connects fine.

Also, zmtrigger.pl sometimes exits with following message:

variable is not a string at /usr/share/perl5/ZoneMinder/Memory/Mapped.pm line 109.

Any ideas??
Did you solved you problem about ZM closing the connection via Telnet after some minutes connected?

Re: zmtrigger.pl configuration

Posted: Fri Jun 29, 2012 12:27 am
by coinageboy
Still observing the behaviour of this bug.

When I log into the port 6802, the telnet session dies after +/- 10 minutes. After a few retries, the system refuses to accept a new login...

Because of this problem my Zoneminder is missing major events - the TCP server probably crashes when the cameras and sensors start hitting. It restarts later, but the major event is lost..

I am polishing my Perl skills as I intend to figure it out.

If anybody tried to debug zmtrigger.pl, I am all ears to hear about it...

Augustine Lehecka

Re: zmtrigger.pl configuration

Posted: Sat Jun 30, 2012 1:36 pm
by Lourenco
Classic wrote:You have to compile zm without mmap...thats work for me.
I'm not experienced in ZM or Linux. How can i do that?
In the instructions i followed to install zoneminder i have these steps involving mmap:

Code: Select all

######################
#Install Perl Modules#
######################

perl -MCPAN -e shell

install CPAN

exit

perl -MCPAN -e shell

install YAML PHP::Serialization Module::Load X10::ActiveHome

install Sys::Mmap

exit
It's needed to remove anything? Or just compile zoneminder without it?

AND

Code: Select all

#####################
##Install Zoneminder#
#####################

cd /usr/src && wget http://www2.zoneminder.com/downloads/ZoneMinder-1.24.2.tar.gz

tar -xvzf ZoneMinder-1.24.2.tar.gz

cd /usr/src/ZoneMinder-1.24.2/src && nano zm_utils.cpp

#Insert the following line after other includes,then Ctrl-o to save, Ctrl-x to exit nano
#include <cstdio>

cd /usr/src/ZoneMinder-1.24.2 && \ 
./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin \
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser \
ZM_DB_PASS=zmpass ZM_SSL_LIB=openssl --enable-debug=no \
--with-webgroup=www-data --with-webuser=www-data --enable-mmap CPPFLAGS="-D__STDC_CONSTANT_MACROS ${CPPFLAGS}"

autoconf

aclocal

automake

make

mysql -u root -p < db/zm_create.sql
#Password that is requested is Mysql root password that was entered during install, not your ubuntu password.

mysql -u root -p

grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';

quit

make install
I remove "--enable-mmap", right?

I have zoneminder already installed, so i can do this step again without any uninstallation?

Thank you.

Re: zmtrigger.pl configuration

Posted: Tue Jul 03, 2012 5:36 pm
by Lourenco
Problem solved. Now zmtrigger works correctly with telnet input strings.

Just reinstalled Zoneminder without mmap.

It was just needed to change the command used to install ZM when appears "--enable-mmap" to "--enable-mmap=no".

Before re-installed ZM, I needed to drop the zm.sql database (via webmin). I did a backup and restore.

Re: zmtrigger.pl configuration

Posted: Sun Jul 08, 2012 12:42 am
by coinageboy
I am glad to see that someone figured this one out.

I still consider this problem a MAJOR BUG in Zoneminder.

Re: zmtrigger.pl configuration

Posted: Fri Nov 15, 2013 8:31 am
by sj3fk3
I totally agree.. This is a MAJOR BUG!

After a couple of triggers I get:

$ /usr/bin/zmtrigger.pl
variable is not a string at /usr/share/perl/5.14.2/ZoneMinder/Memory/Mapped.pm line 113.

Re: zmtrigger.pl configuration

Posted: Fri Jan 03, 2014 10:17 pm
by iconnor
For those who are using my zoneminder ppa, and update to libsys-mmap-perl is there which should fix the problem. All others should reference upstream

https://rt.cpan.org/Public/Bug/Display.html?id=91483