[Zope] Keeping Zope Alive

cyrille cyrilleml@kbuilder.net
Fri, 03 Jan 2003 21:02:16 +0100


This is a multi-part message in MIME format.
--------------080605050207000207050502
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Yes,
not a simple problem.

I'm using a line like :
	su --command=3D${zopePath}/start zope &> ${zopePath}/var/start-init.log =
&
in the start/stop file :
	/etc/rc.d/init.d/zope

I join my Zope sysinit script to this mail.

Perhaps continuing the thread to fine a great solution ;o)

cyrille

Mike Renfro a =E9crit:
> On Fri, Jan 03, 2003 at 05:40:55PM +0100, cyrille wrote:
>=20
>>Mike Renfro a =E9crit:
>>
>>>On Fri, Jan 03, 2003 at 04:24:43AM -0400, beno wrote:
>>>
>>>
>>>
>>>>I seem to have run into this problem before but I don't remember how =
to=20
>>>>fix it. I start my Zope with:
>>>>./start -u www &
>>>>but it doesn't go into a background process. When I close the shell (=
or=20
>>>>lose my Internet connection) Zope crashes (2.6.x, RH7.2). What to do?=

>>>
>>>
>>>man nohup
>>>
>>
>>I think nohup is not the answer :
>=20
>=20
> Actually, it probably is the answer. Not the only answer, but a valid
> one nonetheless. See below for what he'll end up using to make it work:=

>=20
>=20
>>   `nohup' does not automatically put the command it runs in the
>>background; you must do that explicitly, by ending the command line
>>with an `&'.
>=20
>=20
> The problem he's getting is that Zope is trying to write some sort of
> debugging message, warning, or something similar to its controlling
> TTY. He may also see IOError exceptions before Zope crashes, or as
> it's crashing. At least core Zope 2.5.1 spits out a warning about a
> deprecated regex interface every time you start or restart it.
>=20
> When the controlling TTY is gone (he logs out or loses his
> connection), Zope will eventually die as a result of not being able to
> write these messages. This is apparently fixed in 2.6, but I've not
> installed that anywhere to verify it.
>=20
> As for me, I have Zope run as part of the system startup, so it'll
> spew these messages to /dev/tty1 as long as I don't restart the init
> script from a shell prompt. If I do need to restart Zope without using
> the Restart button in the control panel, I make sure that I'm either
> on the machine's physical console, or else that I'm restarting it from
> inside a 'screen' session I keep running 24/7 on the system.
>=20
> Prior references at
> http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=3D=
&Query=3Dnohup&SearchOrder=3D1&Start=3D1&Count=3D20
> -- and if Dieter agrees with me, it must be correct, right?
>=20


--------------080605050207000207050502
Content-Type: application/x-java-applet;version=1.1.1;
 name="zope"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="zope"

IyEvYmluL2Jhc2gKIwojIGNoa2NvbmZpZzogMzQ1IDkwIDkwCiMgZGVzY3JpcHRpb246IFN0
YXJ0IG9yIHN0b3AgdGhlIHpvcGUgZGFlbW9uCiMgcHJvY2Vzc25hbWU6IHpvcGUKIwojIC9l
dGMvcmMuZC9pbml0LmQvem9wZQojCiMgYnkgY3lyaWxsZUBrdGFsYW5kLmNvbSAyMDAxLTAz
LTE1CiMKCiMgU291cmNlIGZ1bmN0aW9uIGxpYnJhcnkKLiAvZXRjL3JjLmQvaW5pdC5kL2Z1
bmN0aW9ucwoKIyBWYXJpYWJsZXMKem9wZVBhdGg9Jy91c3IvbG9jYWwvWm9wZScKCiMgRXhl
Y3V0ZQpjYXNlICIkMSIgaW4KICAgIHN0YXJ0KQogICAgICAgIFsgLWYgJHt6b3BlUGF0aH0v
dmFyL1oyLnBpZCBdICYmIGtpbGwgLTAgYGNhdCAke3pvcGVQYXRofS92YXIvWjIucGlkYCA+
L2Rldi9udWxsIDI+JjEKICAgICAgICBpZiBbIC1mICR7em9wZVBhdGh9L3Zhci9aMi5waWQg
LWEgIiQ/IiAhPSAiMCIgXSA7IHRoZW4KICAgICAgICAgICAgZWNobyAiQmFkIHN0b3Agb2Yg
em9wZSBkYWVtb24uLi4iCiAgICAgICAgICAgIGVjaG8gLW4gIlJlc3RvcmluZyB6b3BlIGZp
bGU6IgoKICAgICAgICAgICAgcm0gLWYgJHt6b3BlUGF0aH0vdmFyL1oyLnBpZAogICAgICAg
ICAgICBybSAtZiAke3pvcGVQYXRofS92YXIvcGNnaS5zb2MKICAgICAgICAgICAgcm0gLWYg
JHt6b3BlUGF0aH0vdmFyL0RhdGEuZnMubG9jawogICAgICAgICAgICBybSAtZiAke3pvcGVQ
YXRofS92YXIvelByb2Nlc3NNYW5hZ2VyLnBpZAoKICAgICAgICAgICAgZWNob19zdWNjZXNz
CiAgICAgICAgICAgIGVjaG8KICAgICAgICBmaQoKICAgICAgICBpZiBbICEgLWYgJHt6b3Bl
UGF0aH0vdmFyL1oyLnBpZCBdIDsgdGhlbgogICAgICAgICAgICBlY2hvIC1uICJTdGFydGlu
ZyB6b3BlIGRhZW1vbjogIgogICAgICAgICAgICAjJHt6b3BlUGF0aH0vc3RhcnQgJj4gL2Rl
di9udWxsCiAgICAgICAgICAgICMgMjAwMi0xMC0xOCBtYWRAa3RhbGFuZC5jb20KCSAgICAj
IyMgICAgJHt6b3BlUGF0aH0vc3RhcnQKICAgICAgICAgICAgc3UgLS1jb21tYW5kPSR7em9w
ZVBhdGh9L3N0YXJ0IHpvcGUgJj4gJHt6b3BlUGF0aH0vdmFyL3N0YXJ0LWluaXQubG9nICYK
CiAgICAgICAgICAgIHdoaWxlIDogOyBkbyBbIC1mICR7em9wZVBhdGh9L3Zhci9aMi5waWQg
XSAmJiBicmVhawogICAgICAgICAgICAgICAgc2xlZXAgMSAmJiBlY2hvIC1uICcuJwogICAg
ICAgICAgICBkb25lCgogICAgICAgICAgICBjYXQgJHt6b3BlUGF0aH0vdmFyL1oyLnBpZCA+
IC92YXIvcnVuL3pvcGVfJHpvcGVOYW1lLnBpZAogICAgICAgICAgICB0b3VjaCAvdmFyL3J1
bi96b3BlXyR6b3BlTmFtZS5waWQKCiAgICAgICAgICAgIGVjaG9fc3VjY2VzcwogICAgICAg
ICAgICBlY2hvCiAgICAgICAgZWxzZQogICAgICAgICAgICAkMCBzdGF0dXMKICAgICAgICBm
aQogICAgOzsKICAgIHN0b3ApCiAgICAgICAgaWYgWyAtZiAke3pvcGVQYXRofS92YXIvWjIu
cGlkIF07IHRoZW4KICAgICAgICAgICAgZWNobyAtbiAiU3RvcHBpbmcgem9wZSBkYWVtb246
ICIKICAgICAgICAgICAgIyAyMDAyLTEwLTE4IG1hZEBrdGFsYW5kLmNvbQogICAgICAgICAg
ICAjWyAtZiAke3pvcGVQYXRofS92YXIvWjIucGlkIF0gJiYga2lsbCBgY2F0ICR7em9wZVBh
dGh9L3Zhci9aMi5waWRgCiAgICAgICAgICAgIHN1IC0tY29tbWFuZD0ke3pvcGVQYXRofS9z
dG9wIHpvcGUKICAgICAgICAgICAgcm0gLWYgJHt6b3BlUGF0aH0vdmFyL1oyLnBpZAogICAg
ICAgICAgICBybSAtZiAke3pvcGVQYXRofS92YXIvcGNnaS5zb2MKICAgICAgICAgICAgcm0g
LWYgJHt6b3BlUGF0aH0vdmFyL0RhdGEuZnMubG9jawogICAgICAgICAgICBybSAtZiAke3pv
cGVQYXRofS92YXIvelByb2Nlc3NNYW5hZ2VyLnBpZAoKICAgICAgICAgICAgZWNob19zdWNj
ZXNzCiAgICAgICAgICAgIGVjaG8KICAgICAgICBlbHNlCiAgICAgICAgICAgIGVjaG8gIlpv
cGUgaXMgbm90IHJ1bm5pbmcuLi4iCiAgICAgICAgZmkKICAgIDs7CiAgICByZWxvYWR8cmVz
dGFydCkKICAgICAgICAkMCBzdG9wCiAgICAgICAgJDAgc3RhcnQKICAgIDs7CiAgICBzdGF0
dXMpCiAgICAgICAgaWYgWyAtZiAke3pvcGVQYXRofS92YXIvWjIucGlkIF07IHRoZW4KCiAg
ICAgICAgICAgIGNhdCAke3pvcGVQYXRofS92YXIvWjIucGlkID4gL3Zhci9ydW4vem9wZS5w
aWQKICAgICAgICAgICAgdG91Y2ggL3Zhci9ydW4vem9wZS5waWQKCiAgICAgICAgICAgIGVj
aG8gIlpvcGUgKHBpZCBgaGVhZCAtMSAvdmFyL3J1bi96b3BlLnBpZGApIGlzIHJ1bm5pbmcu
Li4iCiAgICAgICAgZWxzZQogICAgICAgICAgICBlY2hvICJab3BlIGlzIG5vdCBydW5uaW5n
Li4uIgogICAgICAgIGZpCiAgICA7OwogICAgKikKICAgICAgICBlY2hvICJVc2FnZTogL2V0
Yy9yYy5kL2luaXQuZC96b3BlIHtzdGFydHxzdG9wfHJlc3RhcnR8cmVsb2FkfHN0YXR1c30i
CiAgICBleGl0IDEKZXNhYwoKZXhpdCAwCg==
--------------080605050207000207050502--