monitoring Zope with Daemontools (svscan)
I'm having some trouble getting my Zope 2.5.1 to work with Daemontools. I can get EITHER zope OR the logging service started, but never both for some reason. When Zope is running, it doesn't respond to any requests. Here's my ps output: 1092 ? S 0:00 svscan /service 1093 ? S 0:00 \_ supervise zope 1246 ? Z 0:00 | \_ [python <defunct>] 1094 ? S 0:00 \_ supervise log 1098 ? S 0:00 \_ /usr/local/bin/multilog t /var/log/zopedebug I don't know why, but in this case, Zope died and the logging service started. Here's my /service_zope/run file: #! /bin/sh # Frank Tegtmeyer, fte@lightwerk.com # http://www.lightwerk.com/zope/monitoring # exec 2>&1 echo "------- start by supervise -------" PATH=$PATH:/usr/local/bin reldir=/usr/local/zope INST_HOME=`cd $reldir; pwd` export INST_HOME exec setuidgid zope /usr/local/zope/bin/python \ $INST_HOME/z2.py \ -m -d -w 80 -f 21 -F '' -Z '' Here's my /service_zope/log/run file #!/bin/sh # Frank Tegtmeyer, fte@lightwerk.com # http://www.lightwerk.com/zope/monitoring exec /usr/local/bin/setuidgid zopelog /usr/local/bin/multilog t /var/log/zopedebug As you can see, I've done some editing to fit my configuration, and have been mucking around with the options in an attempt to get it to work. Any help you could offer would be greatly appreciated. Thanks, Davis Marques
On Wed, Mar 12, 2003 at 02:31:52PM -0800, Davis Marques wrote:
I'm having some trouble getting my Zope 2.5.1 to work with Daemontools.
It's not very nice I'm afraid :(
exec setuidgid zope /usr/local/zope/bin/python \ $INST_HOME/z2.py \ -m -d -w 80 -f 21 -F '' -Z ''
Have you tried running this command from the console? Get this command working first before you start worrying about daemontools. I notice at least two things wrong with it: 1) z2.py -m expects the next argument to be a port number. To disable the monitor port, you want "-m -" 2) z2.py detaches from the terminal unless you give the -D (debug) option. Yes, this sucks. You can either roll with it and give -D, or do what I did and write a script that launches zope, receives the signals that daemontools sends, and kills or restarts zope as necessary. This sort-of works for me, it's not very reliable and i'm not sure why. BTW, Zope 2.7 is expected to finally start isolating the many things that the -D option toggles; you'll be able to run zope in the foreground or background as you please regardless of the other "debug" options. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's FUNCTIONARY X-STETOSCOPE! (random hero from isometric.spaceninja.com)
On Wed, Mar 12, 2003 at 02:31:52PM -0800, Davis Marques wrote:
I'm having some trouble getting my Zope 2.5.1 to work with Daemontools. I can get EITHER zope OR the logging service started, but never both for some reason. When Zope is running, it doesn't respond to any requests. Here's my ps output:
1092 ? S 0:00 svscan /service 1093 ? S 0:00 \_ supervise zope 1246 ? Z 0:00 | \_ [python <defunct>] 1094 ? S 0:00 \_ supervise log 1098 ? S 0:00 \_ /usr/local/bin/multilog t /var/log/zopedebug
I don't know why, but in this case, Zope died and the logging service started.
Take a look in /var/log/zopedebug for clues as to why Zope is not starting. Also, you could try running the run script manually to see if Zope complains. The only fundamental difference between this and what I'm running is I'm using INSTANCE_HOME to have a few Zope servers running with a common Zope install. You might try hard coding the path to z2.py and/or check to see that INST_HOME is getting set to the correct path. -- Dave =============================================================== | <- You must be smarter than this stick to ride the Internet -Mike Handler ===============================================================
participants (3)
-
Dave Hall -
Davis Marques -
Paul Winkler