zmtrigger.pl configuration

Forum for questions and support relating to the 1.25.x releases only.
Locked
coinageboy
Posts: 17
Joined: Sun May 27, 2012 1:06 am

zmtrigger.pl configuration

Post 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??
Classic
Posts: 16
Joined: Mon Aug 02, 2010 10:48 pm

Re: zmtrigger.pl configuration

Post by Classic »

You have to compile zm without mmap...thats work for me.
Lourenco
Posts: 12
Joined: Sun May 13, 2012 6:34 pm

Re: zmtrigger.pl configuration

Post 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?
coinageboy
Posts: 17
Joined: Sun May 27, 2012 1:06 am

Re: zmtrigger.pl configuration

Post 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
Lourenco
Posts: 12
Joined: Sun May 13, 2012 6:34 pm

Re: zmtrigger.pl configuration

Post 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.
Lourenco
Posts: 12
Joined: Sun May 13, 2012 6:34 pm

Re: zmtrigger.pl configuration

Post 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.
coinageboy
Posts: 17
Joined: Sun May 27, 2012 1:06 am

Re: zmtrigger.pl configuration

Post by coinageboy »

I am glad to see that someone figured this one out.

I still consider this problem a MAJOR BUG in Zoneminder.
sj3fk3
Posts: 2
Joined: Wed Nov 13, 2013 9:35 am

Re: zmtrigger.pl configuration

Post 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.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zmtrigger.pl configuration

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