ZM and USB quickcam

Support and queries relating to all previous versions of ZoneMinder
Locked
keyboardgnome
Posts: 63
Joined: Sat Apr 08, 2006 10:18 pm

ZM and USB quickcam

Post by keyboardgnome »

Greetings all,

I'm currently am trying to get a USB quick cam to work with ZM. I have the quickcam working within the linux environment just fine, other applications capture images from it easily. Currently, ZM wont update the source alert from red to green, and I'm still having it on monitor mode until then. I have NO image output from clicking on the 'zones' link for the camera. When I have logging set to 9, this is what I get that is if immediate interest.

Code: Select all

04/08/06 18:21:28.765854 zmu[11519].INF-zm_debug.c/304 [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.11519]
04/08/06 18:21:28.767272 zmu[11519].DB1-zm_monitor.cpp/1471 [Got 1 monitors]
04/08/06 18:21:28.768565 zmu[11519].DB1-zm_monitor.cpp/149 [monitor purpose=0]
04/08/06 18:21:28.768664 zmu[11519].DB1-zm_monitor.cpp/156 [shm.size=9642948]
04/08/06 18:21:28.768805 zmu[11519].ERR-zm_monitor.cpp/160 [Can't shmget, probably not enough shared memory space free: Permissio
n denied]
I've already looked into the shmget README stuffs. ZM came with the ZM_SHM_KEY set as 0x7a6d2000, however after running ipcs -m, i found out it's suppose to be 0x7a6d2001. I updated it and restarted the server, and I still get the same error.

Any other errors that are generated state that directories cannot be created, even though I've been gracious enough to the system and invoked the taboo '777'. The only other problem is that I cannot delete any monitored devices *at all*. If i need to remove it to 'start over' I have to drop the database and reinstall that.

So, does anyone have any pointers? I'd love to get this program running.

Oh, one last thing, this is the last bit of intel from my syslog:

Code: Select all

Apr  8 18:19:24 hirohito zmdc[11497]: INF ['zmupdate.pl -c' started at 06/04/08 18:19:24] 
Apr  8 18:19:24 hirohito zmwatch[11493]: INF [Watchdog pausing for 30 seconds] 
Apr  8 18:19:24 hirohito Update agent starting at 06/04/08 18:19:24 

Apr  8 18:21:10 hirohito zmu[11515]: INF [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.11515]
Apr  8 18:21:28 hirohito zmu[11519]: INF [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.11519]
Apr  8 18:22:52 hirohito zmc_dvideo0[11479]: INF [USB: 1000 - Capturing at 4.74 fps]
Apr  8 18:26:22 hirohito zmc_dvideo0[11479]: INF [USB: 2000 - Capturing at 4.76 fps]
Apr  8 18:29:52 hirohito zmc_dvideo0[11479]: INF [USB: 3000 - Capturing at 4.76 fps]
keyboardgnome
Posts: 63
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome »

It should be noted that I have tried

echo 134217728 >/proc/sys/kernel/shmall
echo 134217728 >/proc/sys/kernel/shmmax

And no matter what, on a 1GHz system that has one camera on monitor mode with 512 RAM, this is what I still get:

Code: Select all

04/08/06 19:52:44.945359 zmu[12845].INF-zm_debug.c/304 [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.12845]
04/08/06 19:52:44.946767 zmu[12845].DB1-zm_monitor.cpp/1471 [Got 1 monitors]
04/08/06 19:52:44.948032 zmu[12845].DB1-zm_monitor.cpp/149 [monitor purpose=0]
04/08/06 19:52:44.948134 zmu[12845].DB1-zm_monitor.cpp/156 [shm.size=9642948]
04/08/06 19:52:44.948275 zmu[12845].ERR-zm_monitor.cpp/160 [Can't shmget, probably not enough shared memory space free: Permission denied]
keyboardgnome
Posts: 63
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome »

AH HA!

It should be noted from hence forth! Apache wasnt executing with the same username/group that ZM was, and hence the permission denied!

MAKE SURE THAT APACHE AND ZM are the SAME perm for this error!!

Problem solved :)
dadaniel
Posts: 6
Joined: Sat Apr 08, 2006 8:00 pm
Contact:

Post by dadaniel »

Problem solved
Can you please describe how you solved it?
How did you change the username/group of apache?
keyboardgnome
Posts: 63
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome »

The problem was that I missunderstood the instructions in the manual. When it says to have in the zm.conf file the same username and group that apache is executing by, I made the assumption that my default apache install was using 'apache:apache'. So, I checked httpd.conf and low and behold, it wasnt 'apache:apache'; so I changed it to being that, restarted the apache server, restarted ZM and the permissions error went away. Just as a FYI, you may want to change the perms of your folders too :)
Locked