[Zope] Can't get ZEO running with zeoctl start

Jens Vagelpohl jens at dataflake.org
Thu Sep 8 03:56:13 EDT 2005


On 8 Sep 2005, at 08:39, Mikko Koivunen wrote:
>>> opensocket
>>>     sock.bind(tempname)
>>>   File "<string>", line 1, in bind
>>> socket.error: (13, 'Permission denied')
>>> This is annoying because I would want to put zeoctl in init.d and  
>>> use it
>>> with service/chkconfig. Zope 2.7.6, Python 2.3.5, running on RHEL4.

Have you checked all file permissions to ensure that the user running  
Zope can use them? My guess would be that you broke permissions by  
running as root, which simply is not a good thing to do. Run Zope  
under a normal user account, and change file ownership to that user.  
Then don't put zeoctl into init.d, write a small wrapper around it  
that uses zeoctl.

Here is what I use in init.d on my CentOS box, notice how you can  
change the user account used for starting up a service by passing "-- 
user FOO" to the daemon helper:

------------------------------------------------------------------------ 
------
#!/bin/sh
# Startup script for Zope client

# chkconfig: 2345 93 03
# description: Start Zope Corp Zope Client
# inspired by chrism 01/10/2001

# Source function library.
. /etc/rc.d/init.d/functions

instance="/path/to/InstanceHome"
zopectl="$instance/bin/zopectl"

[ -f $zopectl ] || exit 0

prog="Zope"

start() {
     echo -n $"Starting $prog: "
     daemon --user zope $zopectl start
     RETVAL=$?
     echo
     return $RETVAL
}

stop() {
     echo -n $"Stopping $prog: "
     $zopectl stop
     RETVAL=$?
     echo
     return $RETVAL
}

case "$1" in
     start)
         start
         ;;

     stop)
         stop
         ;;

     restart)
         $zopectl restart
         ;;

     logtail)
         $zopectl logtail
         ;;
     rotate)
         $zopectl logreopen
         ;;
     *)
         echo $"Usage: $0 {start|stop|restart|logtail|rotate}"
         exit 1

esac

##exit $RETVAL
------------------------------------------------------------------------ 
-----


jens



More information about the Zope mailing list