Monitor turns red after several hours

Forum for questions and support relating to the 1.26.x releases only.
Post Reply
tduncklee
Posts: 10
Joined: Sun Sep 22, 2013 2:07 am

Monitor turns red after several hours

Post by tduncklee » Wed Oct 02, 2013 11:28 pm

I've searched and have not found any hints on why this is happening. I have 3 monitors set up on a 3GHz Quad core with 4G RAM. One is a 2MP IP using ffmpeg. The other two are local attached to a Kodicom 8800. All are set to monitor only. After several hours, the IP display turns solid red. Looking at the camera with VLC it is still working fine. If I restart ZoneMinder, the camera comes back. The locally attached cameras never miss a beat.

Any hints on what could be causing this?

windracer
Posts: 61
Joined: Sat Jul 23, 2011 1:15 am

Re: Monitor turns red after several hours

Post by windracer » Thu Oct 03, 2013 6:25 pm

I've been getting a lot of red capture events as well, but it's from my furthest wireless camera so I just figured it was due to low signal strength. I haven't seen it go completely red, though (which lends credence to my "dropped signal" theory).

tduncklee
Posts: 10
Joined: Sun Sep 22, 2013 2:07 am

Re: Monitor turns red after several hours

Post by tduncklee » Thu Oct 03, 2013 10:45 pm

I happened to be watching the ZM log when my monitor went red. There was nothing unusual happening in the log then the following appeared as fast as my browser could scroll it:
1380811951.497372 zmc_m1 3541 -2 ERR Unable to read packet from stream 0: error -1 zm_ffmpeg_camera.cpp 215

I sure would like to figure out why only my IP monitor goes red after a few hours. I just got another IP camera in. I'll hook it up and see if the same happens to it.

JayD
Posts: 15
Joined: Tue Sep 24, 2013 4:20 am

Re: Monitor turns red after several hours

Post by JayD » Wed Oct 09, 2013 4:49 am

How about the second camera? Does it have the same issue?

tduncklee
Posts: 10
Joined: Sun Sep 22, 2013 2:07 am

Re: Monitor turns red after several hours

Post by tduncklee » Wed Oct 09, 2013 4:44 pm

I'm still working on this one but it seems the camera does something every few hours that causes ZM to loose the feed. VLC does the same thing. However, If I manually close and open the connection it comes right back. Maybe ZM should have a feature where, if a feed is lost, close the connection and re-open it?

My 2nd IP camera is wireless at the moment and it occasionally flashes red but the connection never drops permanently. One difference is the problem camera is using ffmpeg and the working one is using Remote/http/simple. Humm... Maybe it's ffmpeg that needs to detect a hung feed and attempt a re-connect rather than ZM. I don't clearly understand everything yet. LOL

PacoLM
Posts: 970
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Monitor turns red after several hours

Post by PacoLM » Wed Oct 09, 2013 5:11 pm

Hi,

Is it a Foscam or Foscam clone? Is it installed outdoors? I've read some posts talking about the camera hanging or resetting due to a fw bug when the CCD has a lot of light.

Hope it helps!

PacoLM

mini-ITX system (4 IPCams - Ubuntu20.04 - ZM1.34.15)
TelegramBot

lucianog
Posts: 2
Joined: Fri Aug 31, 2012 2:27 am

Re: Monitor turns red after several hours

Post by lucianog » Tue Oct 15, 2013 4:28 am

I have the same problem, I have 16 cameras Foscam 8904W. In my case, I connect via VPN to the site where the cameras. I assume it can be bandwidth problem. Anyway, I leave a small video where you see the problem.

My system run Ubuntu Server 12.04.3 LTS x64 and Zoneminder is 1.26.4 Configured for Low Bandwidth.
The Hardware is:
Pentium(R) Dual-Core CPU E5700 @ 3.00GHz
8GB DDR-II
HDD 500GB

Regards
Attachments
Event-1-r1-s1.avi.zip
(220.29 KiB) Downloaded 116 times

tduncklee
Posts: 10
Joined: Sun Sep 22, 2013 2:07 am

Re: Monitor turns red after several hours

Post by tduncklee » Tue Oct 22, 2013 2:36 am

PacoLM,

No not a Foscam. It's a Chinese 2MP VGB101-IP. I love the camera if only I could keep it connected... This camera has such a great image and is adjustable 2.8-12mm. It does great at night also. I'd like to use more of these if I can get it working. I'm ready to offer a bounty for help getting it working. I'm sure its just a configuration with ffmpeg or something. If I could get it working with the built in rtsp of ZM, that might work also.

martinanth
Posts: 8
Joined: Tue Oct 22, 2013 10:47 am

Re: Monitor turns red after several hours

Post by martinanth » Tue Oct 22, 2013 11:04 am

Hi Team,
I had a similar issue with 3 IP camera's (Dahua IP-HFW2100). The display for camera's would go red after a few minutes. It took me a while but I managed to work out the problem.

Essentially iptables were stopping the feed.
My test, to see if iptables was the problem was very simple. From the command line "service iptables stop". Waited approx. 2 hours and didn't have any issues.

If this works for you, and you need iptables running, then continue reading.

I edited /etc/sysconfig/iptables and added the following lines after "-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT"

----- inserted lines start here -----
# rtsp only on LAN
-A INPUT -s 192.168.1.0/24 -m tcp -p tcp --dport 554 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m udp -p udp --dport 554 -j ACCEPT

# RTP - the media stream
# related to the port range in Zoneminder
-A INPUT -m state --state NEW -m udp -p udp --dport 40200:40499 -j ACCEPT

----- inserted lines stop ---------

This allows the RTSP protocol work correctly

Hope this is useful.

tduncklee
Posts: 10
Joined: Sun Sep 22, 2013 2:07 am

Re: Monitor turns red after several hours

Post by tduncklee » Tue Oct 22, 2013 5:24 pm

martinanth,

That's a great tip!!! Something for me to remember when I do get this working and set the box up for live service. However, it's not whats causing my problem. I have iptables off and my two other IP cameras never miss a beat. However, the other two are set up as remote and this one is using ffmpeg.

TD

Frederica123
Posts: 3
Joined: Wed Oct 23, 2013 3:09 am

Re: Monitor turns red after several hours

Post by Frederica123 » Wed Oct 23, 2013 3:23 am

Too many people to update,and lead to congestion?

tduncklee
Posts: 10
Joined: Sun Sep 22, 2013 2:07 am

Re: Monitor turns red after several hours

Post by tduncklee » Wed Oct 23, 2013 3:49 am

martinanth,

Another good thought but no, not the problem. At the moment I'm testing with only one camera and it is aimed at objects that do not move. It was in monitor mode so ZM machine had nearly zero load.

martinanth
Posts: 8
Joined: Tue Oct 22, 2013 10:47 am

Re: Monitor turns red after several hours

Post by martinanth » Sun Oct 27, 2013 6:57 am

Hi tduncklee,

Two suggestions,
1. Disable off SELINUX and reboot the system.
Reason - SELINUX has been known to cause all sorts of strange issues.

2. In the ZoneMinder configuration for the camera. Remove any entries in "Maximum FPS" and "Alarm Maximum FPS". In the Camera configuration (for me it is in my Dahua IPC-HFW2100), change your Frame rate(FPS) to 15 frames per second.
Reason - perhaps the camera isn't able to send enough data to the computer and ZoneMinder panics. OR ZoneMinder cannot keep with the amount of data ZM is receiving.

I suggest you test each separately.

One last question, is your CPU configured for virtualization.

Cheers
Anthony

tduncklee
Posts: 10
Joined: Sun Sep 22, 2013 2:07 am

Re: Monitor turns red after several hours

Post by tduncklee » Sun Oct 27, 2013 8:01 pm

martinanth,

SELINIX is off. It was turned off when I first installed the OS.

Maximum FPS and Alarm Maximum FPS are blank. Camera is set to 6 FPS.

I believe the BIOS does have virtualization enabled. Should this be off or on?

The camera appears to do something every few hours to cause this. It fails streaming to QuickTime, VLC and ZM. Since I really want to use this camera, I've figured out how to mitigate the problem. If you watch the log file and kill the process for that camera, it's back online in about 3 seconds. I have two scripts:
zm-log-watch.sh
#!/bin/sh
/usr/bin/tail -Fn1 /var/log/zm/zmc_m1.log | /bin/awk '/Unable to read packet from stream 0/ { system("/home/tim/zm-camera-feed-kill.sh") }'

and

zm-camera-feed-kill.sh
#!/bin/sh
/bin/kill `/bin/ps ax|/bin/grep --max-count=1 "zmc -m 1"|/bin/awk '{print $1}'`

I'd combine the two into one if I could figure out the magic needed to nest single quotes. '\'' does not seem to work...

I need to make the script more generic and have it figure out the id# of the camera on it's own but for now this works.

TD :)

mythedoff
Posts: 25
Joined: Sat Dec 04, 2010 5:21 pm

Re: Monitor turns red after several hours

Post by mythedoff » Tue Oct 29, 2013 3:55 am

tduncklee wrote:
...

I'd combine the two into one if I could figure out the magic needed to nest single quotes. '\'' does not seem to work...

...
Try assigning an apostrophe or quotes to a variable.

Code: Select all


$ awk -v thecruxofthebiscuit="'" '{ print thecruxofthebiscuit }' < somefile
'


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests