Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 4743 invoked from network); 17 Feb 2003 08:46:31 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 17 Feb 2003 08:46:31 -0000 Received: (qmail 22450 invoked by uid 97); 17 Feb 2003 08:48:16 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 22443 invoked from network); 17 Feb 2003 08:48:15 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 17 Feb 2003 08:48:15 -0000 Received: (qmail 2100 invoked by uid 500); 17 Feb 2003 08:46:01 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 2036 invoked from network); 17 Feb 2003 08:46:00 -0000 Received: from unknown (HELO mailres.fastwebnet.it) (213.140.2.42) by daedalus.apache.org with SMTP; 17 Feb 2003 08:46:00 -0000 Received: from mobilesimo (213.140.8.86) by mailres.fastwebnet.it (6.5.032) id 3E22EE4F00546AC9 for tomcat-user@jakarta.apache.org; Mon, 17 Feb 2003 09:46:11 +0100 From: "Simone Chiaretta" To: "Tomcat Users List" Subject: R: R: Startup/shutdown script Date: Mon, 17 Feb 2003 09:46:26 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: <1a3dd1e8a8.1e8a81a3dd@adobe.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: jmong@adobe.com [mailto:jmong@adobe.com] > 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" > 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: jmong@adobe.com [mailto:jmong@adobe.com] > > > 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" > > > 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- > unsubscribe@jakarta.apache.org > > > > For additional commands, e-mail: tomcat-user- > > help@jakarta.apache.org> > > > > > > > > > > > ----------------------------------------------------------------- > > ---- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: tomcat-user- > help@jakarta.apache.org > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------- > > -- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org