You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Pawson <da...@gmail.com> on 2009/02/02 16:45:35 UTC
Re: jsvc problem with PID. Resolution
Progress.
Uninstalled the FC10 tomcat6 (it does need
documentation, asp classes, servlet api classes, ROOT + examples, and
other deps)
Reinstalled from tc main site. As root.
In $CATALINA_HOME/bin/jsvc-src/native there is a file Tomcat.sh
which, when updated for various changes
1. paths.
2. PID (now tomcat6 rather than the original jsvc name)
3. I've added a restart option.
Produces a working jsvc script... when run by root.
Below if of interest to anyone.
The envars are for my setup.
# This is for of Tomcat-6.x (Apache Tomcat 6)
#
# Adapt the following lines to your configuration
JAVA_HOME=/usr/java/default
CATALINA_HOME=/apps/tomcat6
DAEMON_HOME=$CATALINA_HOME/bin
TOMCAT_USER=dpawson
PIDFILE=/var/run/tomcat6.pid
TMP_DIR=/tmp
CATALINA_OPTS=
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$DAEMON_HOME/commons-daemon.jar:\
$CATALINA_HOME=/bin/bootstrap.jar
case "$1" in
start)
#
# Start Tomcat
#
$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-pidfile $PIDFILE \
-Dcatalina.home=$CATALINA_HOME \
-Djava.io.tmpdir=$TMP_DIR \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.BootstrapService
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
;;
stop)
#
# Stop Tomcat
#
PID=`cat $PIDFILE`
if [ -f $PIDFILE ]
then
kill $PID
else
echo "No PID, TC not running?"
fi
;;
restart)
#
# Stop Tomcat
#
PID=`cat $PIDFILE`
if [ -f $PIDFILE ]
then
kill $PID
else
echo "No PID, TC not running?"
fi
#
# Start Tomcat
#
$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-pidfile $PIDFILE \
-Dcatalina.home=$CATALINA_HOME \
-Djava.io.tmpdir=$TMP_DIR \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.BootstrapService
PID=`cat $PIDFILE`
echo "Tomcat now running, PID is $PID"
;;
*)
echo "Usage tomcat.sh start/stop"
exit 1;;
esac
Thanks for the help.
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org