LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-29-2004, 10:55 AM   #1
zeta111
LQ Newbie
 
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0
Post 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
=========================================
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernal panic: no init found suguname Mandriva 1 03-05-2005 04:45 AM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
Help! Configuring Kernal failed, GRUB can't boot new kernal, help! sabaka Linux - Newbie 4 09-16-2003 09:12 PM
kernal panic: No init found??? s9722 Linux - General 14 06-11-2003 09:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration