LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Tomcat 4.1.30 boot init problem on 2.4.18-18 kernal - (https://www.linuxquestions.org/questions/linux-software-2/tomcat-4-1-30-boot-init-problem-on-2-4-18-18-kernal-163768/)

zeta111 03-29-2004 10:55 AM

Tomcat 4.1.30 boot init problem on 2.4.18-18 kernal -
 
Hi all -

I have installed Jakarta Tomcat 4.1.30 on a RedFlag 3.2 distro (identical to RedHat 7.x except Chinese) kernal 2.4.18-18. Starting Tomcat from the command line is no prob, but getting it to start from boot via /etc/rc.d/init.d init level 3 and 5 is proving a challenge.

I am running Tomcat as user:tomcat group:tomcat, which also owns the Catalina_Home directory.

Here is my /etc/rc.d/init.d/tomcat script, which is also getting managed via chkconfig (--add tomcat ) to make sure all the S and K's are in order in the rcd.x directories. The standard Tomcat startup.sh and shutdown.sh scripts have not been touched.

A basic init question: where/how does "service tomcat start" command get envoked at startup? Is there anything else I may be overlooking? Has anyone seen this problem where Tomcat doesn't start at boot from rc.d, or perhaps may throw some light on this one?

TIA,

ZZ.

=================================================
#!/bin/sh
#
# Startup script for the Jakarta Tomcat Java Servlets and JSP server
#
# chkconfig: - 85 15
# description: Jakarta Tomcat Java Servlets and JSP server
# processname: tomcat
# pidfile: /var/run/tomcat.pid
# config:

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

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Set Tomcat environment.
export JAVA_HOME=/opt/j2sdk_nb/j2sdk1.4.2
export CLASSPATH=.:/opt/j2sdk_nb/j2sdk1.4.2/lib/tools.jar:/opt/j2sdk/j2sdk1.4.2/jre/lib/rt.jar
export CATALINA_HOME=/opt/tomcat-4
# export CATALINA_OPTS="-Dbuild.compiler.emacs=true"
export PATH=/opt/j2sdk/j2sdk1.4.2/bin:/opt/j2sdk/j2sdk1.4.2/jre/bin:$PATH

[ -f /opt/tomcat-4/bin/startup.sh ] || exit 0
[ -f /opt/tomcat-4/bin/shutdown.sh ] || exit 0

export PATH=$PATH:/usr/bin:/usr/local/bin

# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n "Starting Tomcat: "
/opt/tomcat-4/bin/startup.sh
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat
;;
stop)
# Stop daemons.
echo -n "Shutting down Tomcat: "
/opt/tomcat-4/bin/shutdown.sh
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat
;;
restart)
$0 stop
$0 start
;;
condrestart)
[ -e /var/lock/subsys/tomcat ] && $0 restart
;;
status)
status tomcat
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac

exit 0
=========================================


All times are GMT -5. The time now is 05:18 PM.