reconnecting Ip Cam

Support and queries relating to all previous versions of ZoneMinder
Locked
picard71
Posts: 4
Joined: Thu Jun 08, 2006 8:03 am

reconnecting Ip Cam

Post by picard71 »

Hi to all
I'm a beginner in using zoneminder and I meet a problem:
I have an Ip Cam in record mode.
I physically disconnect it.
I reconnect after some hour and zma and zmc processes take many minutes to run again.

Is there any parameter that I can change to restart zma and zmc more quickly ?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

not that i know to but rather than continually restart the zmc, we could use a sepertae process to try and get a http response from the ip & port number and every say 30 seconds, when a response was recieved we could restart that monitor? I dont know how to achieve this maybe a nagios script
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
erasokamotesk
Posts: 1
Joined: Wed May 31, 2006 12:20 pm
Location: nowhere

Post by erasokamotesk »

totally agreed with you
me - nobody
Eklectick
Posts: 127
Joined: Sat Nov 20, 2004 1:12 am

Post by Eklectick »

Could this help?

It is already implemented in recent versions, I do not remember since what version Phil got it in there but perhaps this could help. It is an option in the System tab of the configuration with a default value of 5 minutes, before there was an option, I belive it took about 15 minutes before restart.

Code: Select all

ZM_WATCH_MAX_DELAY 
The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines the maximum delay we will allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above.
Regards!
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

yeah thats the option but im unsure what load and log info etc it would generate if it just blindly tried to reconnect when its going to fail. Phil will have set the default for a reason i would think
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
picard71
Posts: 4
Joined: Thu Jun 08, 2006 8:03 am

Post by picard71 »

I have changed ZM_WATCH_MAX_DELAY : it was 30 min!!
I resolved my problem setting it to 5 min...

thx to all !!
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I think the original problem was a result of ZM trying to restart processes when the camera is disconnected. If this fails (because they can't connect to the cam) then they will be queued to be restarted after a delay. This delay increases with each subsequent failure until it hits ZM_MAX_RESTART_DELAY seconds. This is to stop a machine getting swaped with continuous attempts to restart processes. Once this maximum value is hit then the restart attaempts take place only at these intervals. So no matter when you plug your cam in it may be up to this time before ZM notices.
Phil
Locked