[lug] tomcat5.5 as daemon on FC4

Hugh M. Brown hugh at math.byu.edu
Sat Nov 19 18:09:50 MST 2005


> 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


I just looked a little closer.  export'ing the CLASSPATH wouldn't serve
any purpose.  I did look at a jsvc startup script that I modified for a
friend and I had DAEMON_HOME set to $CATALINA_HOME/bin instead of just
to the $CATALINA_HOME that you have set.

HTH,

Hugh




More information about the LUG mailing list