Changing detection zone breaks the video stream

Forum for questions and support relating to the 1.24.x releases only.
Locked
bobMuk
Posts: 4
Joined: Sun May 08, 2011 2:43 pm

Changing detection zone breaks the video stream

Post by bobMuk »

I'm running Zoneminder 1.24.2-8 which I apt-get'd on a Debian box from it's standard repositories. Using an Edimax IP camera as a source.

Had a few issues with paths that meant I had to change the symlinks in /usr/share/zoneminder rather than change the apropriate fields in the options/paths box (no idea why but playback of captured clips wouldn't work unless I changed the symlink /usr/share/zoneminder/images to point to my mass storage directory manually)

...but apart from that everything seems to work. That is, until I click on the zone associated with the camera, drag the corners of the motion detection box to cover only part of the image and click save and restart zoneminder.

If I then click on the camera the window pops up but I just get Firefox's broken-image icon instead of my camera's stream. At the same time I get this error in apache's error.log:

Code: Select all

[Sun May 08 15:58:59 2011] [error] [client 192.168.1.101] socket_sendto( /local/zoneminder/socks/zms-171375s.sock ) failed: No such file or directory, referer: <http removed>monolith/zm/index.php?view=watch&mid=5
[Sun May 08 15:58:59 2011] [error] [client 192.168.1.101] array (\n  0 => \n  array (\n    'file' => '/usr/share/zoneminder/ajax/stream.php',\n    'line' => 55,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /local/zoneminder/socks/zms-171375s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/usr/share/zoneminder/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/usr/share/zoneminder/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: <http removed>monolith/zm/index.php?view=watch&mid=5
The file zms-171375s.sock doesn't exist but the path to it does and is chmod'd 777, so if something's prevented zoneminder from creating the file it shouldn't be permissions.
Note that the error log has errors about depreciated functions but from googling I gather they're "normal".

If I delete the zone then create a new one which defaults to 100% of the image covered, everything starts working again.

Has anyone seen anything similar?
bobMuk
Posts: 4
Joined: Sun May 08, 2011 2:43 pm

Re: Changing detection zone breaks the video stream

Post by bobMuk »

I've run the same Zoneminder setup with a local USB camera and I don't get the problem.
Looks like it's IP cam specific.
danskelly
Posts: 3
Joined: Wed May 18, 2011 1:27 am

Re: Changing detection zone breaks the video stream

Post by danskelly »

I've got the same issue... Here's some additional info.

Additionally, I've noticed that when I open a camera to monitor, if I 'ls -l /tmp' repeatedly, I get:

Code: Select all

# ls -l /tmp/*.sock
srwxr-xr-x 1 www-data www-data 0 2011-05-17 18:22 /tmp/zmdc.sock
srwxr-xr-x 1 www-data www-data 0 2011-05-17 18:33 /tmp/zms-139718w.sock
And then after about 5 sec, the zms-*.sock file disapears. Then, about 5 seconds later, it comes back... and so on, and so on, as long as the webcam window is open.

Here is the zm_debug log from when I opened the webcam viewing window:

Code: Select all

05/17/11 18:36:12.888317 zms[-1].INF-zm_debug.c/292 [New Debug Level = 6, New Debug Log = /tmp/zm_debug.log.19185]
05/17/11 18:36:12.888561 zms[-1].DB1-zms.cpp/98 [Query: mode=jpeg&monitor=3&scale=100&maxfps=10&buffer=1000&user=***&connkey=859189&rand=1305682572]
05/17/11 18:36:12.888684 zms[-1].INF-zm_user.cpp/140 [Authenticated user '***']
05/17/11 18:36:12.889142 zms[-1].DB1-zm_monitor.cpp/2262 [Got 1 monitors]
05/17/11 18:36:12.893622 zms[-1].DB1-zm_monitor.cpp/338 [monitor purpose=0]
05/17/11 18:36:12.893660 zms[-1].DB1-zm_monitor.cpp/345 [mem.size=82945524]
05/17/11 18:36:12.893796 zms[-1].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 960x720 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0]
05/17/11 18:36:12.922800 zms[-1].DB1-zm_monitor.cpp/458 [Monitor FamilyRoom has function 2]
05/17/11 18:36:12.922814 zms[-1].DB1-zm_monitor.cpp/459 [Monitor FamilyRoom LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
05/17/11 18:36:12.922824 zms[-1].DB1-zm_monitor.cpp/460 [Monitor FamilyRoom IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
05/17/11 18:36:12.922835 zms[-1].DB1-zm_monitor.cpp/2459 [Loaded monitor 3(FamilyRoom), 0 zones]
05/17/11 18:36:12.922973 zms[-1].DB3-zm_stream.cpp/58 [FPS:0.00, MXFPS:10.00, BFPS:0.00, EFPS:0.00, FM:1]
05/17/11 18:36:12.923009 zms[-1].DB3-zm_stream.cpp/65 [aEFPS:0.00, aFM:1]
05/17/11 18:36:12.923089 zms[-1].DB2-zm_monitor.cpp/3374 [Checking swap image location]
05/17/11 18:36:12.923101 zms[-1].DB3-zm_monitor.cpp/3375 [Checking swap image path]
05/17/11 18:36:12.923143 zms[-1].DB3-zm_monitor.cpp/2868 [Swap path '/tmp/zmswap-m3/zmswap-q859189' missing, creating]
05/17/11 18:36:12.923210 zms[-1].DB2-zm_monitor.cpp/3396 [Assigning temporary buffer]
05/17/11 18:36:12.928662 zms[-1].DB2-zm_monitor.cpp/3399 [Assigned temporary buffer]
05/17/11 18:36:13.428800 zms[-1].ERR-zm_monitor.cpp/3579 [Terminating, last frame sent time 1305682572.928716 secs more than maximum of 10.000000]
05/17/11 18:36:13.428881 zms[-1].DB1-zm_monitor.cpp/3588 [Cleaning swap files from /tmp/zmswap-m3/zmswap-q859189]
05/17/11 18:36:13.428985 zms[-1].DB1-zm_monitor.cpp/3616 [Can't glob '/tmp/zmswap-m3/zmswap-q859189/*.*': 3]

zmdc.log

Code: Select all

...
05/17/2011 18:27:52.041137 zmdc[18775].INF [Starting pending process, zmc -m 3]
05/17/2011 18:27:52.042778 zmdc[18775].INF ['zmc -m 3' starting at 11/05/17 18:27:52, pid = 18926]
05/17/2011 18:27:52.256047 zmdc[18775].INF ['zmc -m 3' crashed, signal 6]
...
apache2/error.log (Removed the 'http : / / ' before 'server/zm' because I'm a new user and the board thought I was spammy. :-)

Code: Select all

...
[Tue May 17 18:15:56 2011] [error] [client 192.168.10.108] socket_sendto( /tmp/zms-984456s.sock ) failed: No such file or directory, referer: server/zm/index.php?view=watch&mid=3
[Tue May 17 18:15:56 2011] [error] [client 192.168.10.108] array (\n  0 => \n  array (\n    'file' => '/usr/share/zoneminder/ajax/stream.php',\n    'line' => 55,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /tmp/zms-984456s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/usr/share/zoneminder/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/usr/share/zoneminder/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: server/zm/index.php?view=watch&mid=3
...
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Changing detection zone breaks the video stream

Post by zoneminder »

Areyou saying that your zmc process is continuously restating or just once when you do things with the zones?
Phil
danskelly
Posts: 3
Joined: Wed May 18, 2011 1:27 am

Re: Changing detection zone breaks the video stream

Post by danskelly »

zoneminder wrote:Areyou saying that your zmc process is continuously restating or just once when you do things with the zones?
Oh, sorry... Actually, it seems to be crashing every 10 minutes. Whether or not I open a monitor.

zmdc.log

Code: Select all

...
05/18/2011 08:16:41.190971 zmdc[18775].INF ['zmc -m 3' crashed, signal 6]
05/18/2011 08:26:41.011264 zmdc[18775].INF [Starting pending process, zmc -m 3]
05/18/2011 08:26:41.012620 zmdc[18775].INF ['zmc -m 3' starting at 11/05/18 08:26:41, pid = 401]
05/18/2011 08:26:41.145737 zmdc[18775].INF ['zmc -m 3' crashed, signal 6]
05/18/2011 08:36:41.047882 zmdc[18775].INF [Starting pending process, zmc -m 3]
05/18/2011 08:36:41.049227 zmdc[18775].INF ['zmc -m 3' starting at 11/05/18 08:36:41, pid = 561]
05/18/2011 08:36:41.182815 zmdc[18775].INF ['zmc -m 3' crashed, signal 6]
05/18/2011 08:46:41.050644 zmdc[18775].INF [Starting pending process, zmc -m 3]
05/18/2011 08:46:41.052000 zmdc[18775].INF ['zmc -m 3' starting at 11/05/18 08:46:41, pid = 727]
05/18/2011 08:46:41.184730 zmdc[18775].INF ['zmc -m 3' crashed, signal 6]
danskelly
Posts: 3
Joined: Wed May 18, 2011 1:27 am

Re: Changing detection zone breaks the video stream

Post by danskelly »

It also seems to start the crashing (signal 6) after adding more than 2 zones.

It looks like I have have 2 zones (of any type), but as soon as I add the third, I get the signal 6 crashing. Then, if I remove zones until I get back to 1 or 2 zones, it stops crashing.

Weird.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Changing detection zone breaks the video stream

Post by zoneminder »

The simplest way of tracking this down may be to either go to Options->Debug and switch on extra debug for zmc_m3 (yes it is meant to be an underscore). Set it to level 5 for now. Then you should get debug logs dumped (probably in /tmp unless you have configured otherwise) which might contain someuseful information.
Phil
Locked