Page 1 of 1

Port 6802 closes after first event

Posted: Thu Aug 15, 2013 6:38 pm
by Anonuser001
Dear all,

I have installed zoneminder 1.25 on an ubuntu 12.04.02 LTS server.

I purchased an Axis-Camera (207) for video surveillance and I want to use the motion detection of the axis cam to save cpu ressources. Therefore I configured the axis cam and the zm-server as described in the following link:
http://www.zoneminder.com/wiki/index.ph ... nDetection

The configuration is working, but approx. 2 Minutes after the first event the port 6802 (where zm is listening for new events from the axis cams) is unfortunately closed and therefore zm won't record new events. After a restart of the OS the situation occurs again. First the port is listening and approx. 2 minutes after the first event the server stops listening on port 6802. (netstat -an)

Do you have some hints for me to solve this problem?

Thanks in advance!

BR
Michael

Re: Port 6802 closes after first event

Posted: Thu Aug 15, 2013 8:58 pm
by theforce
Dont know if this helps but you can comment out Unix and Serial line under the "Include from system perl paths only" line in the zmtrigger.pl script. Also comment out the Unix, File, and Serial line under "my @connections".

I had to also increase the MONITOR_RELOAD_INTERVAL to 86400. My issue was that the default setting was restarting the zmtrigger service every 5 minutes. When a restart happened and alarm was present the alarm would not stop. I increased this to 86400 which is 24 hours and all my events get recorded correctly. I dont know why it needs restarted so if someone could explain that option that would help out on how zmtrigger works. Maybe even better documentation on zmtrigger would help.

Re: Port 6802 closes after first event

Posted: Fri Aug 16, 2013 11:42 am
by Anonuser001
Dear theforce,

thanks you for your reply.

I have made your mentioned adaptions in the zmtrigger.pl file.
Unfortunately the error happens also the altered file, do you have some more hints for me? (trigger on cause 2013-08-16 10:39:26, port closed at apporc. 10:43:00 -at this time there is no entry in the log file.)

Additionally I attached my zmtrigger.pl, maybe I have done a wrong setting.

What is a little confusing for me is that I have set the $monitor_reload_time=86400, but when I take a look into the log file, then I see that zma (processing) and zmc (capturing) appears approx. every two minutes.

Thanks in advance!

BR

Re: Port 6802 closes after first event

Posted: Fri Aug 16, 2013 10:23 pm
by theforce
The only other thing I can think of right now is to make sure your shmall and shmmax are set correctly for the amount of memory you have.

Here is how I have mine set in the sysctl.conf file.

kernel.shmall = 33554432
kernel.shmmax = 536870912

I dont fully understand this but you really need this to be changed if you have not all ready. The change from the default is needed if you have cameras higher than 320x240 in resolution.

I dont recall changing anything else that might be connected to the zmtrigger.pl script in some way.


Does the zmtrigger stop if you dont have any alarms from the trigger? Or does zmtrigger only stop after an alarm? On that wiki page there was an issue with the Axis camera and using the + sign. Did you do the fix or are you using the + sign on the camera?

Since I cant find any documentation on the zmtrigger script I'm afraid you might have to wait until someone else with the knowledge can chime in. My code reading ability is not that great and I would like more information on how this script works and how to use it correctly. You may just have to play around with it for a while until it just starts working. Its kind of what I had to do.

Re: Port 6802 closes after first event

Posted: Sat Aug 17, 2013 9:23 pm
by Anonuser001
Dear theforce,

I changed the values of the shmall and shmmax according your settings. (before I had also adjusted values which I had found in the inet)
The Axis 207 is using a resolution higher than 320x240.

Unfortunately the error happens again.

Other might useful information:

The ubuntu server is runnig as a virtual guest on an ESXi 5.1 host.

Which OS are you using? I will give it a try with changing the OS.

Thanks!

BR

Re: Port 6802 closes after first event

Posted: Sat Aug 17, 2013 9:46 pm
by theforce
I'm using kubuntu 12.04 64bit.

Re: Port 6802 closes after first event

Posted: Sat Aug 17, 2013 9:54 pm
by Anonuser001
Dear theforce,

thanks, in the meantime I'll give it a try.

Sorry, in my last response I haven't answered all of your questions:

For the plus(+) I did a change in the zmtrigger.pl file according to a source from the internet.

#
# CUA - Axis camera send the message quoted with"
# CUA - Also Axis camera cannot save the plus sign which
# CUA - possibly exists in the 1|on+20|score|cause|text|showtext formatted msg
$message=~ s/^\"//g;
$message=~ s/\"$//g;
$message=~ s/on /on\+/;
# CUA - end of modifications

The zmtrigger.pl won't stop working if there is no event. With the help of the command ps -ef, I have found that zmtrigger.pl won't appear in the task list after the first event (+ approx. 2 minutes) appears. Therefore my error must have something todo with the zmtrigger.pl.

I'll keep you informed.

Thank you!

Re: Port 6802 closes after first event

Posted: Sat Aug 17, 2013 11:25 pm
by theforce
If I were you I would revet back to the original zmtrigger.pl file and try to use the + sign on the camera. My camera is the M3203 with the latest firmware and it will save the + sign. No need to modify the zmtrigger.pl script like what is listed in the wiki.