AW: [Zope] Problems starting zope server on boot process / Redhat 7.3

news@pernex.de news@pernex.de
Mon, 17 Mar 2003 20:42:58 +0100


Hallo Bryan,

I just put the scripts in here. Just checked all the file locations.
They seem to be ok. However I did not find=20

zProcessManager.pid and
zwatchdog.pid

on my running Zope which I started manually. I commented them out on my
system.


Thanks a lot!



Dominik Fischer

---------------------------------------------
Zope script in /etc/rc.d/init.d

#!/bin/bash
#
#       /etc/rc.d/init.d/zope
#
# Starts the zope daemon - by Markoer
#
# chkconfig: 2345 72 72
# description: zope is a web server specifically for handling \
#              HTTP requests to the Zope web-application service.
# processname: zope
#
# Source function library.

. /etc/rc.d/init.d/functions

case "$1" in

  start)
        # Check if zope is already running
        if [ ! -f /var/lock/subsys/zope ]; then
            echo -n 'Starting zope daemon: '
            /usr/local/zope/261/start 2> /dev/null
            while : ; do
                [ -f /usr/local/zope/261/var/Z2.pid ] && break
                sleep 1 && echo -n "."
            done

            cat /usr/local/zope/261/var/Z2.pid > /var/lock/subsys/zope
            touch /var/lock/subsys/zope
            cat /usr/local/zope/261/var/Z2.pid > /var/run/zope/zope.pid
            touch /var/run/zope/zope.pid
        fi

        echo_success

        echo
        ;;

  stop)
        echo -n 'Stopping zope daemon: '

        [ -f /usr/local/zope/261/var/Z2.pid ] && kill `cat
/usr/local/zope/261/var/Z2.pid`
        rm -f /var/lock/subsys/zope
        rm -f /usr/local/zope/261/var/Z2.pid
        rm -f /usr/local/zope/261/var/Data.fs.lock
        rm -f /usr/local/zope/261/var/zProcessManager.pid
        rm -f /var/run/zope/zope.pid
        rm -f /var/run/zope/pcgi.pid
        rm -f /var/run/zope/pcgi.soc
        rm -f /var/run/zope/zwatchdog.pid
        echo_success
        echo
        ;;

  reload|restart)

        $0 stop

        $0 start
        ;;

  status)
        if [ -f /usr/local/zope/261/var/Z2.pid ]; then
                cat /usr/local/zope/261/var/Z2.pid >
/var/lock/subsys/zope
                touch /var/lock/subsys/zope
                cat /usr/local/zope/261/var/Z2.pid >
/var/run/zope/zope.pid
                touch /var/run/zope/zope.pid
                echo "zope (pid `head -1 /var/run/zope/zope.pid`) is
running..."
        fi
        ;;
  *)
        echo "Usage: service zope {start|stop|restart|reload|status}"
        exit 1
esac
exit 0

---------------------------------------------
ZServer startup script in /usr/local/zope/261/

#!/bin/sh
umask 077
reldir=3D`dirname $0`
cwd=3D`cd $reldir; pwd`
# Zope's event logger is controlled by the "EVENT_LOG_FILE" environment
# variable.  If you don't have a "EVENT_LOG_FILE" environment variable
# (or its older alias "STUPID_LOG_FILE") set, Zope will log to the
standard
# output.  For more information on EVENT_LOG_FILE, see
doc/ENVIRONMENT.txt.
ZLOGFILE=3D$EVENT_LOG_FILE
if [ -z "$ZLOGFILE" ]; then
        ZLOGFILE=3D$STUPID_LOG_FILE
fi
if [ -z "$ZLOGFILE" ]; then
        EVENT_LOG_FILE=3D""
        export EVENT_LOG_FILE
fi
exec /usr/local/zope/261/bin/python $cwd/z2.py -D -u root "$@"


-----Urspr=FCngliche Nachricht-----
Von: Bryan C. Andregg [mailto:bryan.andregg@duke.edu]=20
Gesendet: Montag, 17. M=E4rz 2003 15:57
An: news@pernex.de
Cc: 'Jens Vagelpohl'; zope@zope.org
Betreff: Re: [Zope] Problems starting zope server on boot process /
Redhat 7.3

On Mon, Mar 17, 2003 at 03:43:21PM +0100, news@pernex.de mailed:
> For me the problem seems to be connected with the fact that I cannot
> start zope via=20
> service zope start.
> The only answer I obtain is=20
> env: /etc/init.d/zope: no such file or directory.

This means that something in the zope script isn't where it's expected
to be.
Can you send me the script?
--=20
Bryan C. Andregg		Duke University Medical Center
 Programmer			Dept. of Anesthesiology
 e <bryan.andregg@duke.edu>
 p +1 919 684 6201