Yeah, I already did this test I put an echo in both starting side and stopping side of tomcat script
I'm not looking at any files, I just looking at the console connected directly on the server... I saw (on the screen) the echoed string during startup but I don't see them during shutdown... That's why I suppose the script is not executed.... Bye Simone > -----Messaggio originale----- > Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Inviato: lunedi 17 febbraio 2003 0.38 > A: Tomcat Users List > Oggetto: Re: R: Startup/shutdown script > > > Hmmm.. what file exactly are you looking at again? > > I'm not sure if it suppose to write anything... you should try to do > netstat -a | grep $TOMCAT_PORT where TOMCAT_PORT is typically 8080 > after the restart and see if its truly alive. sleep for like 3 seconds > and then grep for the port. > > Otherwise, try directly echo'ing out some debug vars and see if that > helps. > > stop') > echo "Stopping tomcat" > ... whatever ... > > see if that outputs to your log > > ----- Original Message ----- > From: "Simone Chiaretta" <[EMAIL PROTECTED]> > Date: Sunday, February 16, 2003 3:23 pm > Subject: R: Startup/shutdown script > > > Thanx > > I've tried everything, but it seems like the script is not > > executed when the > > server shutdown > > > > during the startup I see.. > > > > Starting Tomcat [OK] > > > > while during the shutdown I see > > > > Stopping atd [OK] > > here should be tomcat > > Stopping mysql [OK] > > > > Very strange to see this. > > > > Ty > > Simone > > > > > > > > > -----Messaggio originale----- > > > Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > > Inviato: domenica 16 febbraio 2003 19.22 > > > A: Tomcat Users List > > > Cc: Tomcat User List > > > Oggetto: Re: Startup/shutdown script > > > > > > > > > Instead of > > > > > > #!/bin/bash > > > > > > could you try > > > > > > #!/bin/sh > > > > > > also you can try to capture the pid during startup and if its still > > > alive you can forcefully kill it when you shut it down > > > > > > ./startup.sh > /dev/null 2>&1 & > > > echo $! > $TOMCAT_HOME/logs/tomcat.pid > > > > > > shutdown.. > > > ./shutdown.sh > > > if [ $? != 0 ]; > > > then > > > kill -9 `/bin/cat $TOMCAT_HOME/logs/tomcat.pid` > /dev/null 2>&1 > > > fi > > > > > > also I assume you're running this guy as root... because if > > you're not > > > then you might have to give the user permissions to read/write into > > > the file system where tomcat is installed. > > > > > > The other suggestion i can offer is rather than cd to the > directory, > > > specify the full path to the startup/shutdown script > > > > > > Hopefully that helps. > > > > > > Jan-Michael > > > > > > ----- Original Message ----- > > > From: "Simone Chiaretta" <[EMAIL PROTECTED]> > > > Date: Sunday, February 16, 2003 10:03 am > > > Subject: Startup/shutdown script > > > > > > > Hello All, > > > > I'm using tomcat 4.0.4 on a linux (red hat 7.3) server > > > > I've a problem shutting down the tomcat deamon when the > > machine is > > > > stopped/rebooted from maintenance. > > > > The problem is that during the shutdown the shutdown script (the > > > > script I'm > > > > referring to is the one below, not the shutdown.sh inside tomcat > > > > bin dir) is > > > > not executed (or, at least, it doesn't write to the console > > > > "Shutting down > > > > tomcat [OK]" nor write it to the boot.log nor messages and also > > > > doesn'twrite to the catalina.out file the fact that tomcat was > > > > shut down. > > > > > > > > If I execute the script at cmd line, the script shuts down the > > > > process....Does anybody has a clue of what the problem could be? > > > > Thank you > > > > Simone > > > > > > > > Addendum: > > > > I'm using this script: > > > > > > > > #!/bin/bash > > > > JAVA_HOME=/usr/java/j2sdk1.4.0_01 > > > > TOMCAT_HOME=/usr/jakarta-tomcat-4.0.4/ > > > > export JAVA_HOME TOMCAT_HOME > > > > > > > > case "$1" in > > > > start) > > > > cd $TOMCAT_HOME/bin > > > > ./startup.sh > > > > ;; > > > > stop) > > > > cd $TOMCAT_HOME/bin > > > > ./shutdown.sh > > > > ;; > > > > *) > > > > echo "usage tomcat start|stop" > > > > ;; > > > > esac > > > > > > > > this is named tomcat, set into the init.d dir inside /etc > > > > and there is K11tomcat link in the rc0.d dir inside /etc > > > > > > > > > > > > ------------------------- > > > > Simone Chiaretta > > > > www.piyosailing.com/S > > > > Any sufficiently advanced technology is indistinguishable from > > magic> > > > > > > > > > --------------------------------------------------------------- > > ---- > > > > -- > > > > To unsubscribe, e-mail: tomcat-user- > [EMAIL PROTECTED] > > > > For additional commands, e-mail: tomcat-user- > > [EMAIL PROTECTED]> > > > > > > > > > > > ----------------------------------------------------------------- > > ---- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: tomcat-user- > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------- > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
