IP Camera stops working regularly

Forum for questions and support relating to the 1.30.x releases only.
Locked
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

IP Camera stops working regularly

Post by Simpler »

I've been using ZoneMinder for years (currently running 1.30.0) and haven't had this problem until recently (with no update to ZoneMinder).

I have one IP camera and two USB cameras. The USB cameras continue to work with no problem, but the IP camera stops sending data every day or every couple of days. Restarting ZoneMinder fixes the problem temporarily until it happens again in another day or so.

When the IP camera stops sending data, there is no error message in the log file and no indicator as to why it stopped. Is there an automated way to periodically check a camera and have it send me a message when it doesn't respond properly?

Thanks
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: IP Camera stops working regularly

Post by Paranoid »

If it is a WiFi camera then see this thread: viewtopic.php?f=36&t=27130
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: IP Camera stops working regularly

Post by Simpler »

@Paranoid, Thanks for the link. I followed the instructions there, but I'm not sure what this is telling me.

When I noticed that the camera was blank in the Montage view, I ran

Code: Select all

netstat -tan
but there was no line that listed the camera and the server IPs.

I restarted zoneminder. The camera was now visible in the Montage view of zoneminder. I reran

Code: Select all

netstat -tan
This time there was a line listing both the camera and server IPs.

Code: Select all

tcp        0      0 192.168.1.20:56200      192.168.1.22:99         ESTABLISHED
Both:

Code: Select all

tcpdump -n -s0 host 192.168.1.20 and port 56200
and

Code: Select all

tcpdump -n -s0 host 192.168.1.22 and port 99
just return

Code: Select all

tcpdump: 
So my question now is, should I still change the keepalive settings?

Thanks
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: IP Camera stops working regularly

Post by Simpler »

Also, I did notice the following errors:

In the zoneminder log file:

Code: Select all

2018-04-13 18:09:13.664260	zmc_m1		20599	INF	Priming capture from http://192.168.1.22:99/videostream.cgi?user=admin&pwd=something	zm_libvlc_camera.cpp	145
2018-04-13 18:09:13.624234	zmc_m1		20599	INF	Starting Capture version 1.30.0	zmc.cpp	250
2018-04-13 18:09:07.254582	zmc_m1		19612	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
In the syslog file:

Code: Select all

Apr 13 18:08:56 localhost 7efe5c001248]
Apr 13 18:08:56 localhost in vout display error: 
Apr 13 18:08:56 localhost iled to change zoom
Apr 13 18:08:56 localhost  
Apr 13 18:08:56 localhost 7efe5c001248]
Apr 13 18:08:56 localhost in vout display error: 
Apr 13 18:08:56 localhost iled to change source AR
Apr 13 18:08:56 localhost  
Apr 13 18:09:18 localhost 7fa95402aff8]
Apr 13 18:09:18 localhost cess_http access error: 
Apr 13 18:09:18 localhost nnot connect to 192.168.1.22:99
Apr 13 18:09:18 localhost  
Apr 13 18:09:42 localhost 7fa95402aff8]
Apr 13 18:09:42 localhost cess_mms access error: 
Apr 13 18:09:42 localhost recognized chunk FATAL (0x2d2d)
Apr 13 18:09:42 localhost  
Apr 13 18:09:42 localhost 7fa95402aff8]
Apr 13 18:09:42 localhost cess_mms access error: 
Apr 13 18:09:42 localhost ader size == 0
Apr 13 18:09:42 localhost  
Apr 13 18:09:42 localhost 55c468a7bf38]
Apr 13 18:09:42 localhost in input error: 
Apr 13 18:09:42 localhost en of `http://192.168.1.22:99/videostream.cgi?user=admin&pwd=something' failed
Apr 13 18:09:42 localhost  
Apr 13 18:09:42 localhost 55c468a7bf38]
Apr 13 18:09:42 localhost in input error: 
Apr 13 18:09:42 localhost ur input can't be opened
Apr 13 18:09:42 localhost  
Apr 13 18:09:42 localhost 55c468a7bf38]
Apr 13 18:09:42 localhost in input error: 
Apr 13 18:09:42 localhost C is unable to open the MRL 'http://192.168.1.22:99/videostream.cgi?user=admin&pwd=something'. Check the log for details.
Apr 13 18:09:42 localhost  
(usernames and passwords changed to protect the innocent)
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: IP Camera stops working regularly

Post by snake »

You mention that restarting brings the camera back... If you are able to change the camera from monitor to none, and ALSO disable it. Then if you change it back to its mode, and enable it, and find it returns, then I have run into a similar problem.

I dealt with it here: https://notabug.org/monitor/ZM_Scripts. I can't promise this hack is painless, but it works for me on any monitor, mocord, or record camera.
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

[Workaround] Re: IP Camera stops working regularly

Post by Simpler »

I worked around this issue by using "swatch" to watch the syslog for "videostream" and when it occurs, restart zoneminder.

It's not pretty, but it works.
Locked