zmtrigger.pl and Binding problems?

Support and queries relating to all previous versions of ZoneMinder
Locked
foreverg
Posts: 25
Joined: Fri Jul 04, 2008 4:16 pm

zmtrigger.pl and Binding problems?

Post by foreverg »

Hi,

I'm having some troubles with the zmtrigger.pl..

when I launch..
sudo ./zmtrigger.pl 1|on|100|Trigger esterno|Allarme da trigger esterno|Allarme trigger
I got:
Can't bind: Indirizzo già in uso at /usr/share/perl5/ZoneMinder/Trigger/Connection.pm line 87
-bash: 100: command not found
-bash: on: command not found
-bash: Trigger: command not found
-bash: Allarme: command not found
-bash: Allarme: command not found
I'm running Ubuntu 8.04 64bit with ZM 1.23.3.. thank you in advance
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Try enclosing the string in quotes ;)
foreverg
Posts: 25
Joined: Fri Jul 04, 2008 4:16 pm

Post by foreverg »

same as before.. but now I only got:
Can't bind: Indirizzo già in uso at /usr/share/perl5/ZoneMinder/Trigger/Connection.pm line 87
address already in use? what does it mean?

thank you :)
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Means that zmtrigger is likely already running.
Try sending your string above through telnet to that machine on port 6802.
If this is not the desired effect then you will need to disable any unwanted functions by editing the script and commenting those functions out.
foreverg
Posts: 25
Joined: Fri Jul 04, 2008 4:16 pm

Post by foreverg »

cordel wrote:Means that zmtrigger is likely already running.
Try sending your string above through telnet to that machine on port 6802.
If this is not the desired effect then you will need to disable any unwanted functions by editing the script and commenting those functions out.
port 6802 seems to be not active.. even if ZM_OPT_TRIGGERS is disabled, it gives to me the same error. :?:
foreverg
Posts: 25
Joined: Fri Jul 04, 2008 4:16 pm

Post by foreverg »

can anyone help me? :)
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

What do you get from

Code: Select all

netstat -atnp
foreverg
Posts: 25
Joined: Fri Jul 04, 2008 4:16 pm

Post by foreverg »

I get:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 5139/mysqld
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 5286/smbd
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 5326/xinetd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5763/apache2
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 10532/Xvnc
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 5303/vsftpd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 5230/cupsd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 5286/smbd
tcp 0 0 127.0.0.1:44767 127.0.0.1:6001 ESTABLISHED 10648/pulseaudio
tcp 0 0 127.0.0.1:49298 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:59745 127.0.0.1:6001 ESTABLISHED 10747/gnome-power-m
tcp 0 0 192.168.1.250:80 192.168.1.187:2628 ESTABLISHED 8073/apache2
tcp 0 0 127.0.0.1:6001 127.0.0.1:42161 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:49299 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:36137 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:53520 127.0.0.1:80 ESTABLISHED 6065/firefox
tcp 0 0 127.0.0.1:41108 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:80 127.0.0.1:56123 ESTABLISHED 8070/apache2
tcp 0 68 127.0.0.1:6001 127.0.0.1:58547 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:56314 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:36139 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 192.168.1.250:51702 209.96.112.15:80 TIME_WAIT -
tcp 0 0 127.0.0.1:37509 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 192.168.1.250:51675 209.96.112.15:80 TIME_WAIT -
tcp 0 0 127.0.0.1:36136 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:53527 127.0.0.1:80 ESTABLISHED 6065/firefox
tcp 0 0 127.0.0.1:6001 127.0.0.1:44309 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:38198 127.0.0.1:6001 ESTABLISHED 10777/trashapplet
tcp 0 0 127.0.0.1:51823 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:58423 ESTABLISHED 10532/Xvnc
tcp 0 0 192.168.1.250:51709 209.96.112.15:80 ESTABLISHED 5369/zmc
tcp 0 0 127.0.0.1:57091 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:56087 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:54984 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:58547 127.0.0.1:6001 ESTABLISHED 10670/metacity
tcp 0 0 192.168.1.250:80 192.168.1.187:2635 ESTABLISHED 8375/apache2
tcp 0 0 127.0.0.1:52513 127.0.0.1:6001 TIME_WAIT -
tcp 0 80 127.0.0.1:42161 127.0.0.1:6001 ESTABLISHED 10887/gnome-termina
tcp 0 0 127.0.0.1:6001 127.0.0.1:44295 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:6001 127.0.0.1:58421 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:51827 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:44308 127.0.0.1:6001 ESTABLISHED 10635/seahorse-agen
tcp 0 0 127.0.0.1:49305 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:40683 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:53538 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:59852 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:49289 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:55173 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:44309 127.0.0.1:6001 ESTABLISHED 10571/x-session-man
tcp 0 0 127.0.0.1:57700 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:58421 127.0.0.1:6001 ESTABLISHED 10672/gnome-panel
tcp 0 0 127.0.0.1:49293 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49288 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:38453 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:54455 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:59607 127.0.0.1:6001 ESTABLISHED 10716/update-notifi
tcp 0 0 127.0.0.1:49295 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:44308 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:51822 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49294 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 192.168.1.250:80 192.168.1.187:2636 ESTABLISHED 8380/apache2
tcp 0 0 127.0.0.1:36134 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:54176 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49301 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49306 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 192.168.1.250:5900 192.168.1.187:2763 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:6001 127.0.0.1:59745 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:39891 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:51825 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:56697 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:59607 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:40683 127.0.0.1:6001 ESTABLISHED 10786/mixer_applet2
tcp 0 0 127.0.0.1:6001 127.0.0.1:49368 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:37037 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49368 127.0.0.1:6001 ESTABLISHED 11107/notification-
tcp 0 0 127.0.0.1:59852 127.0.0.1:6001 ESTABLISHED 10740/nm-applet
tcp 0 0 127.0.0.1:80 127.0.0.1:53527 ESTABLISHED 8404/apache2
tcp 0 0 127.0.0.1:49291 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:36133 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:34932 ESTABLISHED 10532/Xvnc
tcp 0 0 192.168.1.250:80 192.168.1.187:2627 ESTABLISHED 8072/apache2
tcp 0 0 127.0.0.1:42492 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:38973 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49290 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:41913 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:80 127.0.0.1:53520 ESTABLISHED 8367/apache2
tcp 0 0 127.0.0.1:41589 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:51826 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:38109 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:80 127.0.0.1:56122 ESTABLISHED 8427/apache2
tcp 0 0 127.0.0.1:39428 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49297 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:55876 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:49300 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:44767 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:44295 127.0.0.1:6001 ESTABLISHED 10535/gdm
tcp 0 0 127.0.0.1:49304 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 192.168.1.250:80 192.168.1.187:2632 ESTABLISHED 8358/apache2
tcp 0 0 127.0.0.1:53235 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 192.168.1.250:80 192.168.1.187:2631 ESTABLISHED 8357/apache2
tcp 0 0 127.0.0.1:34932 127.0.0.1:6001 ESTABLISHED 10742/python
tcp 0 0 127.0.0.1:39139 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:6001 127.0.0.1:38198 ESTABLISHED 10532/Xvnc
tcp 0 0 127.0.0.1:58423 127.0.0.1:6001 ESTABLISHED 10674/nautilus
tcp 0 0 127.0.0.1:49303 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:42914 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 192.168.1.250:80 192.168.1.187:2637 ESTABLISHED 8376/apache2
tcp 0 0 192.168.1.250:80 192.168.1.187:2633 ESTABLISHED 8366/apache2
tcp 0 0 127.0.0.1:40778 127.0.0.1:6001 TIME_WAIT -
tcp 0 0 127.0.0.1:51824 127.0.0.1:6001 TIME_WAIT -
tcp6 0 0 :::6001 :::* LISTEN 10532/Xvnc
tcp6 0 0 :::22 :::* LISTEN 5015/sshd
tcp6 0 0 192.168.1.250:22 192.168.1.187:2678 ESTABLISHED 9389/sshd: dafne [p
tcp6 0 0 127.0.0.1:56122 127.0.0.1:80 ESTABLISHED 9840/pluginappletvi
tcp6 0 0 127.0.0.1:56123 127.0.0.1:80 ESTABLISHED 9853/pluginappletvi
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Okay so it's not opening a TCP port nor has it bind to one.
Have you disabled unwanted connections in zm_trigger.pl?

For example below you will find chan3 Trigger output and Chan4 Serial input commented out since I use neither.

Code: Select all

my @connections;
push( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan1", channel=>ZoneMinder::Trigger::Channel::Inet->new( port=>6802 ), mode=>"rw" ) );
push( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan2", channel=>ZoneMinder::Trigger::Channel::Unix->new( path=>'/tmp/test.sock' ), mode=>"rw" ) );
#push( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan3", channel=>ZoneMinder::Trigger::Channel::File->new( path=>'/tmp/zmtrigger.out' ), mode=>"w" ) );
#push( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan4", channel=>ZoneMinder::Trigger::Channel::Serial->new( path=>'/dev/ttyS0' ), mode=>"rw" ) );
Locked