File based image source - event problem [added more info]

Support and queries relating to all previous versions of ZoneMinder
Locked
db_404
Posts: 4
Joined: Sun Apr 06, 2008 1:54 am

File based image source - event problem [added more info]

Post by db_404 »

Hi,

I've got zone minder set up and mostly working, however due to the capture card I am using, I'm having to use a file based source - I basically create 1 file per second from the capture card in an external process.

This seems to work ok and motion detection works, however when I go to view events, the event frames/images show up as broken images in the browser. So I can trigger events OK (by moving around in the area covered by the camera), and events show up in the event list, but no images of the captured event are visible (which kind of defeats the point of setting up the system....).

I don't see much of interest in the logs - any thoughts as to where to start?

Edit - on turning on debug logs I can find errors such as these - however all zm processes are running as apache, and events dir is owned by apache - so still somewhat in the dark.

Code: Select all

zm_debug.log.11333:04/27/08 23:03:35.950116 zma_m6[11333].ERR-zm_monitor.cpp/377 [Can't make events/6: Permission denied]
zm_debug.log.11333:04/27/08 23:04:36.905784 zma_m6[11333].ERR-zm_event.cpp/131 [Can't mkdir events/6/37: No such file or directory]
zm_debug.log.11333:04/27/08 23:04:36.905942 zma_m6[11333].INF-zm_monitor.cpp/1184 [Backyard: 061 - Creating new event 37]
zm_debug.log.11333:04/27/08 23:04:36.906118 zma_m6[11333].DB1-zm_event.cpp/340 [Writing pre-capture frame 1]
zm_debug.log.11333:04/27/08 23:04:36.906555 zma_m6[11333].ERR-zm_image.cpp/395 [Can't open events/6/37/001-capture.jpg: No such file or directory]
zm_debug.log.11333:04/27/08 23:04:36.906643 zma_m6[11333].DB1-zm_event.cpp/340 [Writing pre-capture frame 2]
zm_debug.log.11333:04/27/08 23:04:36.906685 zma_m6[11333].ERR-zm_image.cpp/395 [Can't open events/6/37/002-capture.jpg: No such file or directory]
zm_debug.log.11333:04/27/08 23:04:36.906756 zma_m6[11333].DB1-zm_event.cpp/340 [Writing pre-capture frame 3]
zm_debug.log.11333:04/27/08 23:04:36.906796 zma_m6[11333].ERR-zm_image.cpp/395 [Can't open events/6/37/003-capture.jpg: No such file or directory]
zm_debug.log.11333:04/27/08 23:04:36.906865 zma_m6[11333].DB1-zm_event.cpp/340 [Writing pre-capture frame 4]
zm_debug.log.11333:04/27/08 23:04:36.906904 zma_m6[11333].ERR-zm_image.cpp/395 [Can't open events/6/37/004-capture.jpg: No such file or directory]
zm_debug.log.11333:04/27/08 23:04:36.906973 zma_m6[11333].DB1-zm_event.cpp/340 [Writing pre-capture frame 5]
zm_debug.log.11333:04/27/08 23:04:36.907012 zma_m6[11333].ERR-zm_image.cpp/395 [Can't open events/6/37/005-capture.jpg: No such file or directory]
zm_debug.log.11333:04/27/08 23:04:36.9070
Thanks.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

It definately looks like a permissions issue. Can you paste in what the permissions on the events dir look like and what if anything is in there.
Phil
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Also post a snip of your apache error_log looking for any errors with zms.
db_404
Posts: 4
Joined: Sun Apr 06, 2008 1:54 am

Post by db_404 »

So the events structure looks like:

Code: Select all


#ls -ld zoneminder/events
drwxr-xr-x 3 apache apache 96 Apr 27 23:11 zoneminder/events/

ls -lRt zoneminder/events/
zoneminder/events/:
total 0
drwxr-xr-x 2 apache apache 48 Apr 27 23:11 7
lrwxrwxrwx 1 apache apache  1 Apr 27 23:11 Backyard -> 7

zoneminder/events/7:
total 0

[code]

There doesn't look to be anything of interest in apache logs - I see a lot of entries for nph-zms, but nothing looks to be in error.

I think my next step will be to pull the latest version and install by hand - I let the (gentoo) package manager install the version I'm currently using, which is convenient, but lacks some of the control that I'll have if I just build it from the source distribution.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

If you had a permissions problem when you created the monitor, I don't think ZM checks to make sure it exisits and recreates it if needed. Hence why you don't have a folder "6" in your events directory for that camID. I assume that camID 7 for your backyard is not set to record anything and is either disabled or in monitor mode (please correct me if I'm wrong).

Since the error states that it has something to write I can assume that images are being captured for the file fine.

Try creating a "6" folder in your events directory and chown apache:apache and see if it can then record the images.
db_404
Posts: 4
Joined: Sun Apr 06, 2008 1:54 am

Post by db_404 »

Aha! found the problem, after a good deal of hunting around.

It was a config issue - one of the re-installs must have reset my zm.conf file so it was pointing to an invalid web dir. However the directory it was pointing to contained a valid structure, just didn't have the correct permissions (so the error messages make sense).

I now have things up and working (mostly.. still have some issues with my capture card).

Thanks for all the help
Locked