Page 1 of 1

Shared memory not initialized by capture daemon

Posted: Wed Jul 23, 2003 5:56 am
by tfleming
After I run 'zmpkg.pl start' and open one of my monitors, I get no image and the /var/log/messages shows:

Jul 23 05:16:12 sentry zmu[4187]: ERR [Shared memory not initialised by capture daemon]
Jul 23 05:16:13 sentry zms[4191]: INF [Debug Level = 0, Debug Log = ]
Jul 23 05:16:13 sentry zms[4191]: INF [Got 1 monitors]
Jul 23 05:16:13 sentry zms[4191]: INF [monitor mode=0]
Jul 23 05:16:13 sentry zms[4191]: INF [shm.size=9216208]
Jul 23 05:16:13 sentry zms[4191]: ERR [Shared memory not initialised by capture daemon]

If I run zmc -d 0 alone (after a reboot to make sure I have a clean environment)I still have no image but the log shows:

Jul 23 05:21:10 sentry zms[4231]: ERR [Can't shmget: Permission denied]
Jul 23 05:21:19 sentry zmu[4233]: ERR [Can't shmget: Permission denied]
Jul 23 05:21:20 sentry zms[4237]: INF [Debug Level = 0, Debug Log = ]
Jul 23 05:21:20 sentry zms[4237]: INF [Got 1 monitors]
Jul 23 05:21:20 sentry zms[4237]: INF [monitor mode=0]
Jul 23 05:21:20 sentry zms[4237]: INF [shm.size=3072208]
Jul 23 05:21:20 sentry zms[4237]: ERR [Can't shmget: Permission denied]

This occurs whether I start zmc as root or su apache. Any ideas?

Thanks

Re: Shared memory not initialized by capture daemon

Posted: Wed Jul 23, 2003 9:47 am
by zoneminder
Hi Tim,

In the log can you see zmc starting up? Does it look like it gets going ok?

The second example you give may possibly be because you are running zmc as root and the other elements as your web user in which case they will not be able to access the shared memory. To avoid this for your test you can either edit the code (zm_monitor.cpp I think) and change the shared memory permissions from 700 to something else, maybe even 777 or run the zmc as apache by doing a 'su -c'.

Phil,