[lug] tomcat5.5 as daemon on FC4
D. Stimits
stimits at comcast.net
Sat Nov 19 16:59:21 MST 2005
The rpm version of tomcat on Fedora Core 4 is older than I'd like, and
I'm interested in the 5.5 version (specifically 5.5.12). So I downloaded
the tarball and copied it over to /usr/local/tomcat5/. I set up all my
environment variables and jdk1.5.0_05 from Sun. I can start it up just
fine with the bin/startup.sh.
For the life of me I *cannot* get jsvc to work. I've followed the
instructions to the letter and a million variations. I verified
everything is there and permissions are correct. What it always comes
down to is this error line in the log:
svc.exec error: Cannot find daemon loader
org/apache/commons/daemon/support/DaemonLoader
The startup script is run from the $CATALINA_HOME directory, and has this:
###################################
#!/bin/bash
JAVA_HOME=/opt/jdk1.5.0_05/
CATALINA_HOME=/usr/local/tomcat5
DAEMON_HOME=/usr/local/tomcat5
TOMCAT_USER=tomcat
CATALINA_BASE=/usr/local/tomcat5
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar
$DAEMON_HOME/bin/jsvc \
-Djava.endorsed.dirs=$DAEMON_HOME/common/endorsed \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-cp $CLASSPATH \
-outfile ./logs/catalina.out \
-errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap
###################################
The DaemonLoader is definitely in the bin/commons-daemon.jar. The
commons-daemon.jar is readable to all (and the startup is as root
without change to any other user).
Because I use exactly the same environment and exactly the same
variables and bin/startup.sh works, I know that the non-jsvc portions
are correct. Can anyone suggest what I need to do to get jsvc to see the
DaemonLoader in the commons-daemon.jar file which is in the CLASSPATH?
Or more precisely, why it cannot find this class in a file that has the
class (I used the jar tool and verified this exact class is there)? I
talked to someone who it works fine for using very similar settings on
Mandrake/Mandriva, so maybe this is a Fedora weirdness. I even turned
off the SElinux stuff, so it isn't that.
Has anyone here succeeded in making the jsvc in a tarball download
(non-RH rpm) work on Fedora Core 4?
D. Stimits, stimits AT comcast DOT net
More information about the LUG
mailing list