Hi; I seem to have run into this problem before but I don't remember how to 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 lose my Internet connection) Zope crashes (2.6.x, RH7.2). What to do? TIA, beno
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 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 lose my Internet connection) Zope crashes (2.6.x, RH7.2). What to do?
man nohup -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
Mike Renfro a écrit:
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 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 lose my Internet connection) Zope crashes (2.6.x, RH7.2). What to do?
man nohup
I think nohup is not the answer : `nohup': Run a command immune to hangups ======================================== `nohup' runs the given COMMAND with hangup signals ignored, so that the command can continue running in the background after you log out. Synopsis: nohup COMMAND [ARG]... `nohup' increases the scheduling priority of COMMAND by 5, so it has a slightly smaller change to run. If standard output is a terminal, it and standard error are redirected so that they are appended to the file `nohup.out'; if that cannot be written to, they are appended to the file `$HOME/nohup.out'. If that cannot be written to, the command is not run. If `nohup' creates either `nohup.out' or `$HOME/nohup.out', it creates it with no "group" or "other" access permissions. It does not change the permissions if the output file already existed. `nohup' does not automatically put the command it runs in the background; you must do that explicitly, by ending the command line with an `&'. The only options are `--help' and `--version'. *Note Common options::. cyrille
On Fri, Jan 03, 2003 at 05:40:55PM +0100, cyrille wrote:
Mike Renfro a écrit:
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 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 lose my Internet connection) Zope crashes (2.6.x, RH7.2). What to do?
man nohup
I think nohup is not the answer :
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:
`nohup' does not automatically put the command it runs in the background; you must do that explicitly, by ending the command line with an `&'.
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. 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. 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. Prior references at http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=&Query=... -- and if Dieter agrees with me, it must be correct, right? -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
Yes, not a simple problem. I'm using a line like : su --command=${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 écrit:
On Fri, Jan 03, 2003 at 05:40:55PM +0100, cyrille wrote:
Mike Renfro a écrit:
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 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 lose my Internet connection) Zope crashes (2.6.x, RH7.2). What to do?
man nohup
I think nohup is not the answer :
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:
`nohup' does not automatically put the command it runs in the background; you must do that explicitly, by ending the command line with an `&'.
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.
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.
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.
Prior references at http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=&Query=... -- and if Dieter agrees with me, it must be correct, right?
not a simple problem.
Its not that bad, zope 2 just makes it needlessly difficult. Throw away z2.py, it violates the core unix principle of combinging small, simple, programs to accomplish grand tasks. Write a simple replacement that does only what you need it to do, logs to stdout, and doesn't do any of the usual daemon junk. Leave that up to a toolset like http://cr.yp.to/daemontools.html instead. Set it up, sit back, and crack a beer. The only downside to this approach is that currently logging and signal handling are something of a moving target in Zope CVS so you may want to wait for it to stabilize somewhat if you're running the bleeding edge code. -- Jamie Heilman http://audible.transient.net/~jamie/ "We must be born with an intuition of mortality. Before we know the words for it, before we know there are words, out we come bloodied and squalling with the knowledge that for all the compasses in the world, there's only one direction, and time is its only measure." -Rosencrantz
At 01:23 PM 1/3/2003 -0600, you wrote:
On Fri, Jan 03, 2003 at 05:40:55PM +0100, cyrille wrote:
Mike Renfro a écrit:
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 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 lose my Internet connection) Zope crashes (2.6.x, RH7.2). What to do?
man nohup
I think nohup is not the answer :
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:
`nohup' does not automatically put the command it runs in the background; you must do that explicitly, by ending the command line with an `&'.
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.
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.
Not *eventually* die, immediately die. No: I have 2.6: it's not fixed. beno
participants (4)
-
beno -
cyrille -
Jamie Heilman -
Mike Renfro