[Zope] Getting Zope started as a daemon

Robert Oschler robertoschler@hotmail.com
Fri, 23 Aug 2002 18:46:54 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_00F9_01C24AD5.73669F70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This is post is both a request for help and an FYI for those of you who =
are trying to get Zope started as a daemon on SuSE Linux 7.3 Pro:

I'm running Linux SuSE 7.3 Pro.  I'm trying to get the Zope server to =
start at boot-time.  I found the 'jules' document on www.zope.org that =
gave steps to do so with 6.3, but after some modifications it still =
isn't working.  As 'root' I followed the instructions given in the link =
http://www.zope.org/Members/jules/SuSE-6.3_html for setting up Zope as a =
daemon in Suse Linux.  I made all the necessary adjustments for =
directory differences between 6.3 and 7.3 (e.g. - 'init.d' is a sub-dir =
off of '/etc' in 7.3 instead of being a sub-dir off of '/sbin' as it is =
in 6.3, according to 'jules' document).  I changed the symbolic link =
files to be in rc5.d not rc2.d since SuSE 7.3 uses RUNLEVEL 5 not 2.  I =
changed the number portions of the symbolic link files from the =
hard-coded '22' given in 'jules' document to '24' which was the next =
available daemon number.  (If you look in rc5.d you'll see that all the =
'K$' and 'S$' scripts are sequential.  On my system '24' was the next =
available number).  So I have 'K24zope' and 'S24zope' in my rc5.d =
directory.  Lastly, if you make the 'START_ZOPE=3Dyes' addition to =
rc.config, you still have to jump into 'yast2', and using the =
rc-config-editor module,  change START_ZOPE to 'yes'.  This will result =
in SuSEconfig running and setting things up properly.  If you don't, =
then you will find out that even though the rc.config line is =
'START_ZOPE=3Dyes', if you print out the value of the command line =
argument to 'zope' ($1) you'll see that it is set to 'no'.  After doing =
the 'yast2' operation it will be properly set to 'yes'.

I then tested my sample script in an xterm window.  Given the proper =
command line argument (start/stop/status), it started Zope successfully, =
stopped it, and gave a checkproc status all perfectly.  When run at =
bootup however, after boot completes, if I look in the boot message log =
I see the 'zope' script startup messages, but none of the other messages =
from SuSE that used to follow the initialization of all daemon's.  I =
think this is causing SuSE to kill the 'zope' process due to a timeout =
because when I get fully logged in, 'zope' is not in the kpm's process =
list at all.  What's also strange is that I do have to run 'zope stop' =
to clear a lock-flag that 'lock_file.py' put in place, and then I can =
run 'zope start' again and it loads fine. =20

Just to be very clear, it's the same behavior that occurs when you run =
'zope start' from an xterm window.  The script never returns until you =
shut down the zope server.  I would suspect that this kind of behavior =
doesnt' sit well with the bootup scripts.

So what do I have to do to have 'zope start' exit properly so it can run =
as a daemon?

thx



------=_NextPart_000_00F9_01C24AD5.73669F70
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4807.2300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>This is post is both a request for help =
and an FYI=20
for those of you who are trying to get Zope started as a daemon on SuSE =
Linux=20
7.3 Pro:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>I'm running Linux SuSE 7.3 Pro.&nbsp; I'm trying to get the Zope =
server to=20
start at boot-time.&nbsp; I found the 'jules' document on <A=20
href=3D"http://www.zope.org">www.zope.org</A> that gave steps to do so =
with 6.3,=20
but after some modifications it still isn't working.&nbsp; As 'root' I =
followed=20
the instructions given in the link <A=20
href=3D"http://www.zope.org/Members/jules/SuSE-6.3_html">http://www.zope.=
org/Members/jules/SuSE-6.3_html</A>=20
for setting up Zope as a daemon in Suse Linux.&nbsp; I made all the =
necessary=20
adjustments for directory differences between 6.3 and 7.3 (e.g. - =
'init.d' is a=20
sub-dir off of '/etc' in 7.3 instead of being a sub-dir off of '/sbin' =
as it is=20
in 6.3, according to 'jules' document).&nbsp;&nbsp;I changed the =
symbolic link=20
files to be in rc5.d not rc2.d since SuSE 7.3 uses RUNLEVEL 5 not =
2.&nbsp; I=20
changed the number portions of the symbolic link files from the =
hard-coded '22'=20
given in 'jules' document to '24' which was the next available daemon=20
number.&nbsp; (If you look in rc5.d you'll see that all the 'K$' and =
'S$'=20
scripts are sequential.&nbsp; On my system '24' was the next available=20
number).&nbsp; So I have 'K24zope' and 'S24zope' in my rc5.d =
directory.&nbsp;=20
Lastly, if you&nbsp;make the 'START_ZOPE=3Dyes' addition to rc.config, =
you still=20
have to jump into 'yast2', and using the rc-config-editor module,&nbsp; =
change=20
START_ZOPE to 'yes'.&nbsp; This will result in SuSEconfig running and =
setting=20
things up properly.&nbsp; If you don't, then you will find out that even =
though=20
the rc.config line is 'START_ZOPE=3Dyes', if you print out the value of =
the=20
command line argument to 'zope' ($1) you'll see that it is set to =
'no'.&nbsp;=20
After doing the 'yast2' operation it will be properly set to =
'yes'.</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV>
<DIV>I then tested my sample script in an xterm window.&nbsp; Given the =
proper=20
command line argument (start/stop/status), it started Zope successfully, =
stopped=20
it, and gave a checkproc status all perfectly.&nbsp;&nbsp;When run at =
bootup=20
however, after boot completes, if I look in the boot message log I see =
the=20
'zope' script startup messages, but none of the other messages from SuSE =
that=20
used to follow the initialization of all daemon's.&nbsp; I think this is =
causing=20
SuSE to kill the 'zope' process due to a timeout because when I get =
fully logged=20
in, 'zope' is not in the kpm's process list at all.&nbsp; What's also =
strange is=20
that I do have to run 'zope stop' to clear a lock-flag that =
'lock_file.py' put=20
in place, and then I can run 'zope start' again and it loads fine.&nbsp; =
</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Just to be very clear, it's the same =
behavior that=20
occurs when you run 'zope start' from an xterm window.&nbsp; The script =
never=20
returns until you shut down the zope server.&nbsp; I would suspect that =
this=20
kind of behavior doesnt' sit well with the bootup =
scripts.</FONT><BR><BR>So what=20
do I have to do to have 'zope start' exit properly so it can run as a=20
daemon?<BR><BR><FONT face=3DArial size=3D2>thx</FONT></DIV>
<DIV><BR>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_00F9_01C24AD5.73669F70--