[HCoop-Help] k5start / apache daemon question

C. Howell caden at hcoop.net
Fri Aug 15 13:37:16 EDT 2008


Hello,

I tried following the wiki recipes for setting up ones own apache
daemon.  I can start and stop the apache daemon from the command line,
and it works fine, although it always dies overnight-- presumably my
kerberos token runs out.

Here's my crontab:
---
# m h  dom mon dow   command
@reboot        k5start -qtU -f /etc/keytabs/user.daemon/caden --
/afs/hcoop.net/user/c/ca/caden/bin/apache-monitor
0-59/5 * * * * k5start -qtU -f /etc/keytabs/user.daemon/caden --
/afs/hcoop.net/user/c/ca/caden/bin/apache-monitor
---

Here's my "apache-monitor"
---
HOME=/afs/hcoop.net/user/c/ca/caden # Adjust this!!!
SERVERROOT=$HOME/apache2 # The server root directory
PIDFILE=$SERVERROOT/logs/httpd.pid # Process PID gets stored here
HTTPD=$SERVERROOT/bin/httpd # The httpd executable
K5START="k5start -qtU -f /etc/keytabs/user.daemon/caden" # Adjust this!!!

# This is needed for mod_python
export PYTHONPATH="/usr/bin/python"

if (test -f $PIDFILE); then
#if ($K5START -- test `ls $PIDFILE`); then
   PID=`cat $PIDFILE 2> /dev/null`
   kill -0 $PID 2> /dev/null
   if (test $? -ne 0); then
       $K5START -b -- $HTTPD -d $SERVERROOT -DFOREGROUND
       #echo "$K5START -b -- $HTTPD -d $SERVERROOT -DFOREGROUND"
   else
       #echo "exiting...."
       exit 0
   fi
else
   $K5START -b -- $HTTPD -d $SERVERROOT -DFOREGROUND
   #echo "$K5START -b -- $HTTPD -d $SERVERROOT -DFOREGROUND"
fi

exit 0
---

It works if I run
/afs/hcoop.net/user/c/ca/caden/apache2/bin/httpd -d
/afs/hcoop.net/user/c/ca/caden/apache2 -DFOREGROUND
from the command line, but again, the kerberos token runs out
eventually and it dies.

I'm not familiar with how k5start works.  If anyone can spot any
errors in my setup or offer troubleshooting suggestions, I'd
appreciate it.

Thanks,

Caden



More information about the HCoop-Help mailing list