Re: [Zope3-dev] problem with multiple instances of zope3 as daemon via init script on gentoo

2006-01-11 Thread Bernd Dorn


On 11.01.2006, at 15:42, Bernd Dorn wrote:



On 11.01.2006, at 14:27, Jim Washington wrote:


Bernd Dorn wrote:


hi all

i have two init scripts (see below) which start a zope3 instance
this works fine if i start one of them, but if i try to start  
the  second, the following message appears


* Starting Zope in /home/zope1/timetables ...
WARNING! zdrun is managing a different program!
our program   = ['/home/zope1/timetables/bin/runzope']
daemon's args = ['/home/zope1/screens/bin/runzope']
daemon process already running; pid=10839

seems that the pid of the other instance is taken, does anybody  
know  how to solve this

or is there another way to start zope3 as an unprivileged user?
as far as i know there is no effective-user directive in  
zope.conf as  in zope2


Does this script put a zdsock file in /etc/init.d?  I have noticed  
that the zdsock file is created in the directory where zopectl is  
called.  If this is what you are seeing, one solution might be to  
do some cd statements (e.g., cd $INSTANCE_HOME) so that multiple  
zdsock files are created, one for each instance.




thx, you brought me on the right track!

it is actually a problem with the default zdaemon.conf in zopeskel,  
where socket-name is just set to zdsock


this will be placed in the working directory, which in my case was  
the home directory of the user because of the "-" switch to su


so i added the following line to zdaemon.conf:

socket-name $DATADIR/zopectlsock, which this is the behavior of  
zope 2 skel


i would say this is a bug, because instances created with  
mkzopeinstance can not be run in parallel
additionally with socket-name set to zdsock one is unable to run  
zopectl as root, because then the socket gets created in the home  
of root where the user the daemon is running on has no access. this  
leads to an access denied error.


the init script is now the same as with zope2, i can just call  
zopectl directly without suing to the zope user


i will fix this in the trunk


done see: http://svn.zope.org/Zope3/trunk/zopeskel/etc/ 
zdaemon.conf.in?rev=41267&view=rev



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] problem with multiple instances of zope3 as daemon via init script on gentoo

2006-01-11 Thread Bernd Dorn


On 11.01.2006, at 14:27, Jim Washington wrote:


Bernd Dorn wrote:


hi all

i have two init scripts (see below) which start a zope3 instance
this works fine if i start one of them, but if i try to start the   
second, the following message appears


* Starting Zope in /home/zope1/timetables ...
WARNING! zdrun is managing a different program!
our program   = ['/home/zope1/timetables/bin/runzope']
daemon's args = ['/home/zope1/screens/bin/runzope']
daemon process already running; pid=10839

seems that the pid of the other instance is taken, does anybody  
know  how to solve this

or is there another way to start zope3 as an unprivileged user?
as far as i know there is no effective-user directive in zope.conf  
as  in zope2


Does this script put a zdsock file in /etc/init.d?  I have noticed  
that the zdsock file is created in the directory where zopectl is  
called.  If this is what you are seeing, one solution might be to  
do some cd statements (e.g., cd $INSTANCE_HOME) so that multiple  
zdsock files are created, one for each instance.




thx, you brought me on the right track!

it is actually a problem with the default zdaemon.conf in zopeskel,  
where socket-name is just set to zdsock


this will be placed in the working directory, which in my case was  
the home directory of the user because of the "-" switch to su


so i added the following line to zdaemon.conf:

socket-name $DATADIR/zopectlsock, which this is the behavior of zope  
2 skel


i would say this is a bug, because instances created with  
mkzopeinstance can not be run in parallel
additionally with socket-name set to zdsock one is unable to run  
zopectl as root, because then the socket gets created in the home of  
root where the user the daemon is running on has no access. this  
leads to an access denied error.


the init script is now the same as with zope2, i can just call  
zopectl directly without suing to the zope user


i will fix this in the trunk

thx, bernd







___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] problem with multiple instances of zope3 as daemon via init script on gentoo

2006-01-11 Thread Jim Washington

Bernd Dorn wrote:


hi all

i have two init scripts (see below) which start a zope3 instance
this works fine if i start one of them, but if i try to start the  
second, the following message appears


* Starting Zope in /home/zope1/timetables ...
WARNING! zdrun is managing a different program!
our program   = ['/home/zope1/timetables/bin/runzope']
daemon's args = ['/home/zope1/screens/bin/runzope']
daemon process already running; pid=10839

seems that the pid of the other instance is taken, does anybody know  
how to solve this

or is there another way to start zope3 as an unprivileged user?
as far as i know there is no effective-user directive in zope.conf as  
in zope2


my zope version is 3.2 final, but it seems not version specific
my python:
Python 2.4.2 (#1, Dec  6 2005, 15:16:51)
[GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1,  
pie-8.7.7. on linux2


my system:
Linux flow 2.6.14-gentoo-r2 #1 SMP Mon Dec 5 14:23:57 CET 2005 i686  
Intel(R) Xeon(TM) CPU 2.80GHz GenuineIntel GNU/Linux



thx, bernd

init script listing:

INSTANCE_HOME=/home/zope1/screens
ZOPE_USER=zope1

opts="start stop restart kill quit status help"

depend() {
need net
}

start() {
ebegin "Starting Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl start"
eend $?
}

stop() {
ebegin "Stopping Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl stop"
eend $?
}

restart() {
ebegin "Restarting Zope in $INSTANCE_HOME"
svc_stop
svc_start
eend $?
}

kill() {
ebegin "Killing Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl kill"
eend $?
}

quit() {
ebegin "Quitting Zope Daemon Manager $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl quit"
eend $?
}

reload() {
 # throws an error, dunno why
ebegin "Reloading Zope config in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl reload"
eend $?
}

status() {
ebegin "Status of Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl status"
eend $?
}

help() {
ebegin "Help for Zope Daemon Manager in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl help"
eend $?
}

Does this script put a zdsock file in /etc/init.d?  I have noticed that 
the zdsock file is created in the directory where zopectl is called.  If 
this is what you are seeing, one solution might be to do some cd 
statements (e.g., cd $INSTANCE_HOME) so that multiple zdsock files are 
created, one for each instance.


-Jim Washington.
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] problem with multiple instances of zope3 as daemon via init script on gentoo

2006-01-11 Thread Bernd Dorn

hi all

i have two init scripts (see below) which start a zope3 instance
this works fine if i start one of them, but if i try to start the  
second, the following message appears


* Starting Zope in /home/zope1/timetables ...
WARNING! zdrun is managing a different program!
our program   = ['/home/zope1/timetables/bin/runzope']
daemon's args = ['/home/zope1/screens/bin/runzope']
daemon process already running; pid=10839

seems that the pid of the other instance is taken, does anybody know  
how to solve this

or is there another way to start zope3 as an unprivileged user?
as far as i know there is no effective-user directive in zope.conf as  
in zope2


my zope version is 3.2 final, but it seems not version specific
my python:
Python 2.4.2 (#1, Dec  6 2005, 15:16:51)
[GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1,  
pie-8.7.7. on linux2


my system:
Linux flow 2.6.14-gentoo-r2 #1 SMP Mon Dec 5 14:23:57 CET 2005 i686  
Intel(R) Xeon(TM) CPU 2.80GHz GenuineIntel GNU/Linux



thx, bernd

init script listing:

INSTANCE_HOME=/home/zope1/screens
ZOPE_USER=zope1

opts="start stop restart kill quit status help"

depend() {
need net
}

start() {
ebegin "Starting Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl start"
eend $?
}

stop() {
ebegin "Stopping Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl stop"
eend $?
}

restart() {
ebegin "Restarting Zope in $INSTANCE_HOME"
svc_stop
svc_start
eend $?
}

kill() {
ebegin "Killing Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl kill"
eend $?
}

quit() {
ebegin "Quitting Zope Daemon Manager $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl quit"
eend $?
}

reload() {
 # throws an error, dunno why
ebegin "Reloading Zope config in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl reload"
eend $?
}

status() {
ebegin "Status of Zope in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl status"
eend $?
}

help() {
ebegin "Help for Zope Daemon Manager in $INSTANCE_HOME"
su - $ZOPE_USER -c "$INSTANCE_HOME/bin/zopectl help"
eend $?
}


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com