tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Aggarwal <n...@JAMMConsulting.com>
Subject Re: Automatic startup works, shutdown does not
Date Fri, 16 Feb 2001 04:14:42 GMT
Peter:

Yes, I am seeing many shutdown messages.  Just not one for tomcat.

	Neil.


"Peter B. West" wrote:
> 
> Neil,
> 
> Are you seeing any output from other /etc/rc6.d/K* processes on reboot?
> 
> Peter
> 
> Neil Aggarwal wrote:
> >
> > Hello:
> >
> > I am running Tomcat 3.2.1 on RedHat Linux 7.0.
> > I am trying to get tomcat to automatically start and stop when I reboot
> > my server.
> >
> > My server is not local, so I am looking thru /var/log/messages.
> >
> > I seeing messages for when tomcat starts up:
> >
> > Feb 15 12:44:22 neil235 tomcat: Starting tomcat:
> > Feb 15 12:44:22 neil235 tomcat: Guessing TOMCAT_HOME from tomcat.sh to
> > /usr/loca
> > l/jakarta-tomcat-3.2.1/bin/..
> > Feb 15 12:44:22 neil235 tomcat: Setting TOMCAT_HOME to
> > /usr/local/jakarta-tomcat
> > -3.2.1/bin/..
> > Feb 15 12:44:22 neil235 tomcat: Using classpath:
> > /usr/local/jakarta-tomcat-3.2.1
> > /bin/../lib/ant.jar:/usr/local/jakarta-tomcat-3.2.1/bin/../lib/jasper.jar:/usr/l
> > ocal/jakarta-tomcat-3.2.1/bin/../lib/jaxp.jar:/usr/local/jakarta-tomcat-3.2.1/bi
> > n/../lib/parser.jar:/usr/local/jakarta-tomcat-3.2.1/bin/../lib/servlet.jar:/usr/
> > local/jakarta-tomcat-3.2.1/bin/../lib/test:/usr/local/jakarta-tomcat-3.2.1/bin/.
> > ./lib/webserver.jar:/usr/local/j2sdk1.3.0/lib/tools.jar
> > Feb 15 12:44:23 neil235 rc: Starting tomcat:  succeeded
> >
> > But, I dont see any messages among the shutdown messages in
> > that file when the server shuts down for a reboot.
> >
> > Here is exactly what I did:
> >
> > First, I placed the following lines in a file /etc/rc.d/init.d/tomcat:
> > #!/bin/sh
> > # Starts tomcat.
> > #
> > # Source function library.
> > . /etc/rc.d/init.d/functions
> >
> > RETVAL=0
> >
> > # See how we were called.
> > case "$1" in
> >   start)
> >         echo -n "Starting tomcat: "
> >                                 export JAVA_HOME=/usr/local/j2sdk1.3.0
> >         /usr/local/jakarta-tomcat-3.2.1/bin/startup.sh
> >         RETVAL=$?
> >         ;;
> >   stop)
> >         echo -n "Shutting down tomcat: "
> >         /usr/local/jakarta-tomcat-3.2.1/bin/shutdown.sh
> >         echo
> >         RETVAL=$?
> >         ;;
> >   restart)
> >         /usr/local/jakarta-tomcat-3.2.1/bin/shutdown.sh
> >         /usr/local/jakarta-tomcat-3.2.1/bin/startup.sh
> >         ;;
> >   *)
> >         echo "Usage: tomcat {start|stop|restart}"
> >         exit 1
> > esac
> >
> > exit $RETVAL
> >
> > Next, I issued the following commands:
> > chmod +x /etc/init.d/tomcat
> > rm -f /etc/rc3.d/S75tomcat
> > rm -f /etc/rc0.d/K25tomcat
> > rm -f /etc/rc6.d/K25tomcat
> > ln -s /etc/rc.d/init.d/tomcat /etc/rc3.d/S75tomcat
> > ln -s /etc/rc.d/init.d/tomcat /etc/rc0.d/K25tomcat
> > ln -s /etc/rc.d/init.d/tomcat /etc/rc6.d/K25tomcat
> >
> > Finally, I rebooted the server:
> >         /sbin/reboot
> >
> > I did check that I can run the commands manually
> > /etc/rc.d/init.d/tomcat start
> > /etc/rc.d/init.d/tomcat stop
> > Work as I intend them to do so.
> >
> > I just dont understand why this is not working.  This makes
> > no sense to me.  The startup command is working.  I dont
> > understand why the stop command is not -- it uses the same
> > file.
> >
> > Anybody have any ideas?
> >
> > Thanks,
> >         Neil.
> >
> 
> --
> Peter B. West  pbwest@powerup.com.au  http://powerup.com.au/~pbwest
> "Lord, to whom shall we go?"
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org

--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases

Mime
View raw message