Page 1 of 1

ZM 1.22.0 Problems with shared memory. And su.

Posted: Tue Feb 07, 2006 12:09 pm
by r0y
Hi i've got some problems with 1.22.0 here are the erros:

Feb 7 13:56:47 surveilance zmpkg[21249]: ERR [Unable to find valid 'su' syntax]

And lots of these:

Feb 7 13:58:26 surveilance zmu[21340]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]

I've tryed to increase memory now its:

shmall: 154217728
shmmax: 154217728

How much memory do i have to set here and how to fix the invalid syntax?


/Roy

Posted: Tue Feb 07, 2006 3:13 pm
by zoneminder
Can you tell us what distro you are using?

Posted: Tue Feb 07, 2006 7:21 pm
by r0y
Sorry, its a fresh gentoo install.

Posted: Wed Feb 08, 2006 12:58 pm
by r0y
Any one got a ide? I need to get this setup up and running becasue i want to se if those ppl in the appartment downstairs are stealing food from us.. hehe

Posted: Wed Feb 08, 2006 1:24 pm
by tech_fixer
My best advice: use a more thoroughly tested Linux distribution as your plattform. I'm using Fedora Core 4 and it works wonderfully. Only took me 2 hours to set everything up from scratch.

And with Cordel's RPM, it should be even a quicker install!

Regards,
Jose.

Posted: Wed Feb 08, 2006 3:34 pm
by zoneminder
There are plenty of people running ZM on gentoo so I'm a little surprised why you are getting the su error. Can you edit your installed zmpkg.pl and change the value of DBG_LEVEL to 1. Then try and start ZM and post the relevant parts of your zmpkg.log file.

Posted: Wed Feb 08, 2006 8:41 pm
by r0y
tech_fixer wrote:My best advice: use a more thoroughly tested Linux distribution as your plattform. I'm using Fedora Core 4 and it works wonderfully. Only took me 2 hours to set everything up from scratch.

And with Cordel's RPM, it should be even a quicker install!

Regards,
Jose.

Well i don't like RedHat/Fedora, and found that the only distro i like is gentoo, i did however try the Livecd but i didn't get any picture. And all of my computers witch is runnig linux is running gentoo :)

Posted: Wed Feb 08, 2006 8:49 pm
by r0y
Ok with debug level 1 here it is:

/var/log/messages


Feb 8 22:48:38 surveilance zmpkg[25194]: INF [Command: start]
Feb 8 22:48:38 surveilance su(pam_unix)[25197]: session opened for user apache by (uid=0)
Feb 8 22:48:38 surveilance su(pam_unix)[25197]: session closed for user apache
Feb 8 22:48:38 surveilance su(pam_unix)[25199]: session opened for user apache by (uid=0)
Feb 8 22:48:38 surveilance su(pam_unix)[25199]: session closed for user apache
Feb 8 22:48:38 surveilance zmpkg[25194]: ERR [Unable to find valid 'su' syntax]

zmpkg.log

02/08/06 22:48:38.813011 zmpkg[25194].INF [Command: start]
02/08/06 22:48:38.828974 zmpkg[25194].DBG [Testing valid shell syntax]
02/08/06 22:48:38.829740 zmpkg[25194].DBG [Testing 'su apache -c 'true'']
02/08/06 22:48:38.944176 zmpkg[25194].DBG [Test failed, '']
02/08/06 22:48:38.944717 zmpkg[25194].DBG [Testing 'su apache --shell=/bin/sh --command='true'']
02/08/06 22:48:38.970428 zmpkg[25194].DBG [Test failed, '']
02/08/06 22:48:38.970922 zmpkg[25194].ERR [Unable to find valid 'su' syntax]

Posted: Thu Feb 09, 2006 2:03 pm
by zoneminder
r0y wrote:su apache -c 'true'
su apache --shell=/bin/sh --command='true''
Can you try those two commands interactively and post what you get.

Posted: Thu Feb 09, 2006 2:12 pm
by r0y
I tihnk i know whats wrong

su apache --shell=/bin/sh --command='true'' <- one too many of '

Here is goes:

surveilance zoneminder # su apache -c 'true'
surveilance zoneminder # su apache --shell=/bin/sh --command='true''
>

surveilance zoneminder # su apache --shell=/bin/sh --command='true'
surveilance zoneminder #

Posted: Thu Feb 09, 2006 2:35 pm
by zoneminder
I think that was just me making a cut'n'paste typo. Actually what we need to know is whwther the command succeeded, so try this

Code: Select all

su apache -c 'true'
echo $?

su apache --shell=/bin/sh --command='true'
echo $?

Posted: Thu Feb 09, 2006 4:09 pm
by lazyleopard
The apache user may need a shell defined? The default Gentoo install sets apache's shell to /bin/false.

Posted: Thu Feb 09, 2006 4:36 pm
by zoneminder
Yes, I think I'll change this for 1.22.1 to fork and exec instead.

Posted: Thu Feb 09, 2006 6:17 pm
by r0y
Thats nice, but any workarounds now? Cause i really need this up and running :)

Posted: Thu Feb 09, 2006 8:13 pm
by lazyleopard
Try using vipw to edit /etc/passwd, changing

Code: Select all

apache:x:81:81:apache:/www:/bin/false
to

Code: Select all

apache:x:81:81:apache:/www:/bin/bash