Zoneminder not disconnecting from camera.

Forum for questions and support relating to the 1.26.x releases only.
Locked
cpechiar
Posts: 3
Joined: Thu Mar 27, 2014 4:26 pm

Zoneminder not disconnecting from camera.

Post by cpechiar »

Hello

I have 5 Axis 207 IP cameras on the system. They all work fine except that one of them stops streaming and the image becomes red.

I narrowed it down to the amount of simultaneous connections to the camera. The camera accepts up to 10 simultaneous connections.

When I restart the camera it works fine for some time (minutes, sometimes hours) but finally it stops streaming. Then I can see that Zoneminder has 10 opened connections to that camera. All the other cameras work fine.

My first guess was that the camera had a problem. I reloaded its firmware to see if that helped. No change.

Now I am wondering if it is a (known) issue with Zoneminder. Anyhow, I am replacing that particular camera with a d-link one, but I wanted to have some comments before discarding it.

Thanks, Charlie.
mikb
Posts: 604
Joined: Mon Mar 25, 2013 12:34 pm

Re: Zoneminder not disconnecting from camera.

Post by mikb »

cpechiar wrote:Zoneminder has 10 opened connections to that camera.
Obviously ZM should not have 10 open connections. I'm guessing that 9 or 10 of them are dead connections just hanging about. When you get to 10 dead ones, the camera won't talk at all.

Is there anything different about this 1 camera compared to the others (firmware version, settings, wiring/network/hub/link arrangements) that would explain it?

Partly, this sounds like a fault with ZM/ffmpeg (are you using ffmpeg?) leaving hanging connections on an unreliable comms link

How do you know there are 10 connections to the camera (did the camera end tell you this, or the PC/Zoneminder end show 10 connections, or worse still, both agree :( )
cpechiar
Posts: 3
Joined: Thu Mar 27, 2014 4:26 pm

Re: Zoneminder not disconnecting from camera.

Post by cpechiar »

mikb wrote: Is there anything different about this 1 camera compared to the others (firmware version, settings, wiring/network/hub/link arrangements) that would explain it?
No, all cameras are configured and connected to the network in the same way. I compared both ZM and the camera's configuration side by side to a working one and there are no differences (except IP and name and watermark). Even more, I changed it's IP number; same result.

I swapped network cables and power supply with a working one and same result
mikb wrote: Partly, this sounds like a fault with ZM/ffmpeg (are you using ffmpeg?) leaving hanging connections on an unreliable comms link
mmm... OPT_FFMPEG is checked in Options/Images. Where do I check to be more precise?
mikb wrote: How do you know there are 10 connections to the camera (did the camera end tell you this, or the PC/Zoneminder end show 10 connections, or worse still, both agree :( )
The camera logs for sure and I think I confirmed it with ZM connectios, but I am not at the site now and cannot confirm. Again, and sorry for the ignorance, what should I look for this info to be more precise?

Thanks for your reply.

Charlie
mikb
Posts: 604
Joined: Mon Mar 25, 2013 12:34 pm

Re: Zoneminder not disconnecting from camera.

Post by mikb »

"The camera logs for sure and I think I confirmed it with ZM connectios, but I am not at the site now and cannot confirm. Again, and sorry for the ignorance, what should I look for this info to be more precise?"

I wasn't sure how smart the cameras were (meaning: they might confirm how many connections the camera thinks you are making! Like a list of logged in users etc.)

From the computer end, something like "netstat" will show you all the connections your computer has, incoming and outgoing. Filter it (grep) by the IP address/name of the camera. If you really do have 10 connections, then it sounds like ZoneMinder thinks the connection has gone down, raised a new one, and not realised that the old one is still up. This will eventually try the camera's patience :)

Code: Select all

netstat -a | grep "cam01"

tcp        0      0 machine.org.uk:43040 cam01.me.org:http ESTABLISHED <----- Zoneminder capture
tcp        0      0 machine.org.uk.:45004 cam01.me.org:http ESTABLISHED <----- Web browser direct
The picture going red is a common feature of FFMPEG somehow fumbling the connection, and not returning valid pictures.
Locked