RE: R: R: R: R: Startup/shutdown script
Nope. I shut my stuff down manually on the rare occasion that I shut anything down (once or twice a year), so I've never had to investigate this myself. John -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 6:41 AM To: Tomcat Users List Subject: Re: R: R: R: R: Startup/shutdown script Ok. I think I have this problem too. It may be that tomcat is getting heldup on shutdown and never gets outputted in time. Not sure. I will have to look into it further. Please stand by... Unless John has some more insight? I'll try to get back in a little while with some more info. Oscar On Mon, 17 Feb 2003, Simone Chiaretta wrote: > exactly, I have this line > > and I'm doing everything as root... > > I noticed the problem because in catalina.out I just saw > > Starting service Tomcat-Standalone > Apache Tomcat/4.0.4 > > but saw "Stopping service Tomcat-Standalone" only when shuting down > manually the server > > Bye > Simone > > > -Messaggio originale- > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > Inviato: lunedì 17 febbraio 2003 12.13 > > A: Tomcat Users List > > Oggetto: Re: R: R: R: Startup/shutdown script > > > > > > H. > > > > What does this output?: > > /sbin/chkconfig --list tomcatd > > > > It should output this: > > tomcatd 0:off 1:off 2:off 3:on4:on5:on6:off > > > > Are you doing this all as root? > > > > I guess I haven't really looked at my boot process when shutting > > down. I'll try it. > > > > Oscar > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > Alreay done > > > nothing changed > > > > > > Simo > > > > > > > -Messaggio originale- > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > Inviato: lunedì 17 febbraio 2003 12.05 > > > > A: Tomcat Users List > > > > Oggetto: Re: R: R: Startup/shutdown script > > > > > > > > > > > > Why don't you try my script and substitute your environment > > > > variables? > > > > > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > Go down to the bottom and click on "tomcatd". Save it to > > > > /etc/rc.d/init.d/tomcatd > > > > > > > > Then > > > > /sbin/chkconfig --del tomcatd #to be safe /sbin/chkconfig --add > > > > tomcatd > > > > > > > > If it works then figure out what's different if you want to > > > > learn why yours doesn't work. > > > > > > > > Oscar > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > I'm saying that the shutdown script is not executing.. I tried > > > > > putting a debug line in the script but I don't get it on the > > > > > console... In the catalina.out I don't get a line saying that > > > > > Tomcat > > was stopped... > > > > > > > > > > anyway... > > > > > Simone > > > > > > > > > > > > > > > > -Messaggio originale- > > > > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > > > > A: 'Tomcat Users List' > > > > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > > > > > > > In the script you posted, you aren't doing things the way > > > > > > that a RH-installed script would do them. > > > > > > > > > > > > For example, you aren't sourcing /etc/rc.d/init.d/functions, > > > > you aren't > > > > > > calling daemon() or killproc(), etc. etc. etc. > > > > > > > > > > > > I'm not sure what you want to see...are you saying that your > > > > > > script does not stop Tomcat, or just that you don't get the > > > > > > pretty "OK" prompt? > > > > > > > > > > > > If it's just the prompt, copy one of the scripts in > > > > /etc/init.d and insert > > > > > > tomcat-specific commands where required. > > > > > > > > > >
Re: R: R: R: R: R: Startup/shutdown script
I'm not sure exactly what's going on, but the I see tomcat is trying to shutdown but the network is already down, so it throws an exception. I had my network script wait for 10 seconds first, but that didn't help. It seems like there may also be something with using daemon/killproc, instead of any other method for shutdown. I also had a minor issue with having not commented out JMX Beans in server.xml. Still working... Oscar On Tue, 18 Feb 2003, Simone Chiaretta wrote: > uhuh.. > happy not to be a white fly :-) > > Infact one thing I noticed is that tomcat take a few seconds to stop... a > probably the system is halted before it gets to write something to the > catalina.out and to the console > I thought the script was run sincronously, so the other waiting the previous > to finish... > > Bye > Simone > > > -Messaggio originale- > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > Inviato: lunedì 17 febbraio 2003 12.41 > > A: Tomcat Users List > > Oggetto: Re: R: R: R: R: Startup/shutdown script > > > > > > Ok. > > > > I think I have this problem too. It may be that tomcat is getting heldup > > on shutdown and never gets outputted in time. Not sure. > > > > I will have to look into it further. > > Please stand by... > > > > Unless John has some more insight? > > > > I'll try to get back in a little while with some more info. > > > > Oscar > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta > > wrote: > > > > > exactly, I have this line > > > > > > and I'm doing everything as root... > > > > > > I noticed the problem because in catalina.out I just saw > > > > > > Starting service Tomcat-Standalone > > > Apache Tomcat/4.0.4 > > > > > > but saw "Stopping service Tomcat-Standalone" only when shuting > > down manually > > > the server > > > > > > Bye > > > Simone > > > > > > > -Messaggio originale- > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > Inviato: lunedì 17 febbraio 2003 12.13 > > > > A: Tomcat Users List > > > > Oggetto: Re: R: R: R: Startup/shutdown script > > > > > > > > > > > > H. > > > > > > > > What does this output?: > > > > /sbin/chkconfig --list tomcatd > > > > > > > > It should output this: > > > > tomcatd 0:off 1:off 2:off 3:on4:on5:on6:off > > > > > > > > Are you doing this all as root? > > > > > > > > I guess I haven't really looked at my boot process when shutting down. > > > > I'll try it. > > > > > > > > Oscar > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > Alreay done > > > > > nothing changed > > > > > > > > > > Simo > > > > > > > > > > > -Messaggio originale- > > > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > > > Inviato: lunedì 17 febbraio 2003 12.05 > > > > > > A: Tomcat Users List > > > > > > Oggetto: Re: R: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > Why don't you try my script and substitute your > > environment variables? > > > > > > > > > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > > > > > Go down to the bottom and click on "tomcatd". Save it to > > > > > > /etc/rc.d/init.d/tomcatd > > > > > > > > > > > > Then > > > > > > /sbin/chkconfig --del tomcatd #to be safe > > > > > > /sbin/chkconfig --add tomcatd > > > > > > > > > > > > If it works then figure out what's different if you want to learn > > > > > > why yours doesn't work. > > > > > > > > > > > > Oscar > > > > > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > > > > > I'm saying that the shutdown script is not executing.. > > > > > > > I tried putting a debug line in the script but I don't > > get it on the > > > > > > > console... > > &
R: R: R: R: R: Startup/shutdown script
uhuh.. happy not to be a white fly :-) Infact one thing I noticed is that tomcat take a few seconds to stop... a probably the system is halted before it gets to write something to the catalina.out and to the console I thought the script was run sincronously, so the other waiting the previous to finish... Bye Simone > -Messaggio originale- > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > Inviato: lunedì 17 febbraio 2003 12.41 > A: Tomcat Users List > Oggetto: Re: R: R: R: R: Startup/shutdown script > > > Ok. > > I think I have this problem too. It may be that tomcat is getting heldup > on shutdown and never gets outputted in time. Not sure. > > I will have to look into it further. > Please stand by... > > Unless John has some more insight? > > I'll try to get back in a little while with some more info. > > Oscar > > > On Mon, 17 Feb 2003, Simone Chiaretta > wrote: > > > exactly, I have this line > > > > and I'm doing everything as root... > > > > I noticed the problem because in catalina.out I just saw > > > > Starting service Tomcat-Standalone > > Apache Tomcat/4.0.4 > > > > but saw "Stopping service Tomcat-Standalone" only when shuting > down manually > > the server > > > > Bye > > Simone > > > > > -----Messaggio originale- > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > Inviato: lunedì 17 febbraio 2003 12.13 > > > A: Tomcat Users List > > > Oggetto: Re: R: R: R: Startup/shutdown script > > > > > > > > > H. > > > > > > What does this output?: > > > /sbin/chkconfig --list tomcatd > > > > > > It should output this: > > > tomcatd 0:off 1:off 2:off 3:on4:on5:on6:off > > > > > > Are you doing this all as root? > > > > > > I guess I haven't really looked at my boot process when shutting down. > > > I'll try it. > > > > > > Oscar > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > Alreay done > > > > nothing changed > > > > > > > > Simo > > > > > > > > > -Messaggio originale- > > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > > Inviato: lunedì 17 febbraio 2003 12.05 > > > > > A: Tomcat Users List > > > > > Oggetto: Re: R: R: Startup/shutdown script > > > > > > > > > > > > > > > Why don't you try my script and substitute your > environment variables? > > > > > > > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > > > Go down to the bottom and click on "tomcatd". Save it to > > > > > /etc/rc.d/init.d/tomcatd > > > > > > > > > > Then > > > > > /sbin/chkconfig --del tomcatd #to be safe > > > > > /sbin/chkconfig --add tomcatd > > > > > > > > > > If it works then figure out what's different if you want to learn > > > > > why yours doesn't work. > > > > > > > > > > Oscar > > > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > > > I'm saying that the shutdown script is not executing.. > > > > > > I tried putting a debug line in the script but I don't > get it on the > > > > > > console... > > > > > > In the catalina.out I don't get a line saying that Tomcat > > > was stopped... > > > > > > > > > > > > anyway... > > > > > > Simone > > > > > > > > > > > > > > > > > > > -Messaggio originale- > > > > > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > > > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > > > > > A: 'Tomcat Users List' > > > > > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > > > > > > > > > > > In the script you posted, you aren't doing things the > way that a > > > > > > > RH-installed script would do them. > > > > > > > > > > > > > > For example, you aren't sourcing /etc/rc.d/init.
Re: R: R: R: R: Startup/shutdown script
Ok. I think I have this problem too. It may be that tomcat is getting heldup on shutdown and never gets outputted in time. Not sure. I will have to look into it further. Please stand by... Unless John has some more insight? I'll try to get back in a little while with some more info. Oscar On Mon, 17 Feb 2003, Simone Chiaretta wrote: > exactly, I have this line > > and I'm doing everything as root... > > I noticed the problem because in catalina.out I just saw > > Starting service Tomcat-Standalone > Apache Tomcat/4.0.4 > > but saw "Stopping service Tomcat-Standalone" only when shuting down manually > the server > > Bye > Simone > > > -Messaggio originale- > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > Inviato: lunedì 17 febbraio 2003 12.13 > > A: Tomcat Users List > > Oggetto: Re: R: R: R: Startup/shutdown script > > > > > > H. > > > > What does this output?: > > /sbin/chkconfig --list tomcatd > > > > It should output this: > > tomcatd 0:off 1:off 2:off 3:on4:on5:on6:off > > > > Are you doing this all as root? > > > > I guess I haven't really looked at my boot process when shutting down. > > I'll try it. > > > > Oscar > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > Alreay done > > > nothing changed > > > > > > Simo > > > > > > > -Messaggio originale- > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > Inviato: lunedì 17 febbraio 2003 12.05 > > > > A: Tomcat Users List > > > > Oggetto: Re: R: R: Startup/shutdown script > > > > > > > > > > > > Why don't you try my script and substitute your environment variables? > > > > > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > Go down to the bottom and click on "tomcatd". Save it to > > > > /etc/rc.d/init.d/tomcatd > > > > > > > > Then > > > > /sbin/chkconfig --del tomcatd #to be safe > > > > /sbin/chkconfig --add tomcatd > > > > > > > > If it works then figure out what's different if you want to learn > > > > why yours doesn't work. > > > > > > > > Oscar > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > I'm saying that the shutdown script is not executing.. > > > > > I tried putting a debug line in the script but I don't get it on the > > > > > console... > > > > > In the catalina.out I don't get a line saying that Tomcat > > was stopped... > > > > > > > > > > anyway... > > > > > Simone > > > > > > > > > > > > > > > > -Messaggio originale- > > > > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > > > > A: 'Tomcat Users List' > > > > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > > > > > > > In the script you posted, you aren't doing things the way that a > > > > > > RH-installed script would do them. > > > > > > > > > > > > For example, you aren't sourcing /etc/rc.d/init.d/functions, > > > > you aren't > > > > > > calling daemon() or killproc(), etc. etc. etc. > > > > > > > > > > > > I'm not sure what you want to see...are you saying that your > > > > > > script does not > > > > > > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > > > > > > > > > > > If it's just the prompt, copy one of the scripts in > > > > /etc/init.d and insert > > > > > > tomcat-specific commands where required. > > > > > > > > > > > > John > > > > > > > > > > > > > -Original Message- > > > > > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > > > > > Sent: Monday, February 17, 2003 4:49 PM > > > > > > > To: Tomcat Users List > > > > > > > Subject: R: R: Startup/shutdown script >
R: R: R: R: Startup/shutdown script
exactly, I have this line and I'm doing everything as root... I noticed the problem because in catalina.out I just saw Starting service Tomcat-Standalone Apache Tomcat/4.0.4 but saw "Stopping service Tomcat-Standalone" only when shuting down manually the server Bye Simone > -Messaggio originale- > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > Inviato: lunedì 17 febbraio 2003 12.13 > A: Tomcat Users List > Oggetto: Re: R: R: R: Startup/shutdown script > > > H. > > What does this output?: > /sbin/chkconfig --list tomcatd > > It should output this: > tomcatd 0:off 1:off 2:off 3:on4:on5:on6:off > > Are you doing this all as root? > > I guess I haven't really looked at my boot process when shutting down. > I'll try it. > > Oscar > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > Alreay done > > nothing changed > > > > Simo > > > > > -Messaggio originale- > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > Inviato: lunedì 17 febbraio 2003 12.05 > > > A: Tomcat Users List > > > Oggetto: Re: R: R: Startup/shutdown script > > > > > > > > > Why don't you try my script and substitute your environment variables? > > > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > Go down to the bottom and click on "tomcatd". Save it to > > > /etc/rc.d/init.d/tomcatd > > > > > > Then > > > /sbin/chkconfig --del tomcatd #to be safe > > > /sbin/chkconfig --add tomcatd > > > > > > If it works then figure out what's different if you want to learn > > > why yours doesn't work. > > > > > > Oscar > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > I'm saying that the shutdown script is not executing.. > > > > I tried putting a debug line in the script but I don't get it on the > > > > console... > > > > In the catalina.out I don't get a line saying that Tomcat > was stopped... > > > > > > > > anyway... > > > > Simone > > > > > > > > > > > > > -Messaggio originale- > > > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > > > A: 'Tomcat Users List' > > > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > > > In the script you posted, you aren't doing things the way that a > > > > > RH-installed script would do them. > > > > > > > > > > For example, you aren't sourcing /etc/rc.d/init.d/functions, > > > you aren't > > > > > calling daemon() or killproc(), etc. etc. etc. > > > > > > > > > > I'm not sure what you want to see...are you saying that your > > > > > script does not > > > > > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > > > > > > > > > If it's just the prompt, copy one of the scripts in > > > /etc/init.d and insert > > > > > tomcat-specific commands where required. > > > > > > > > > > John > > > > > > > > > > > -Original Message- > > > > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > > > > Sent: Monday, February 17, 2003 4:49 PM > > > > > > To: Tomcat Users List > > > > > > Subject: R: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > Hello, > > > > > > I just got home from work > > > > > > I tried your start/shutdown script but I never see during > > > > > > shutdown a row > > > > > > "Stopping Tomcat [OK]" coming out in the console nor in the > > > > > > /var/log/boot > > > > > > and /var/log/messages > > > > > > > > > > > > I cannot figure out what the problem could be > > > > > > Simo > > > > > > > > > > > > > -Messaggio originale- > > > > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > > > > Inviato: domenica 16 febbraio 2003 15.02 > >
R: R: Startup/shutdown script
During shutdown anyway, there is a K11tomcat in rc6.d too... Simo > -Messaggio originale- > Da: Turner, John [mailto:[EMAIL PROTECTED]] > Inviato: lunedì 17 febbraio 2003 23.35 > A: 'Tomcat Users List' > Oggetto: RE: R: Startup/shutdown script > > > > Just to make sure...you are testing this with a shutdown? Or a reboot? > Reboot kills go in rc6.d. > > John > > > -Original Message- > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > Sent: Monday, February 17, 2003 5:31 PM > > To: Tomcat Users List > > Subject: R: R: Startup/shutdown script > > > > > > I installed it also with chkconfig after u told me... > > so now it's with K11tomact in rc0.d > > > > I tried calling the file directly, too... > > > > and when I call the script manually the server stops... > > > > > > > -Messaggio originale- > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > Inviato: lunedì 17 febbraio 2003 23.20 > > > A: 'Tomcat Users List' > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > Where do you have it? What run level? > > > > > > What is the entry for it? Is it a "K" entry or a "S" entry? > > > > > > What happens if you remove the "cd $CATALINA_HOME/bin" entries, > > > and instead > > > call the scripts directly, like this: > > > > > > $CATALINA_HOME/bin/shutdown.sh > > > > > > John > > > > > > > > > > -Original Message- > > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, February 17, 2003 5:17 PM > > > > To: Tomcat Users List > > > > Subject: R: R: Startup/shutdown script > > > > > > > > > > > > I'm saying that the shutdown script is not executing.. > > > > I tried putting a debug line in the script but I don't > > get it on the > > > > console... > > > > In the catalina.out I don't get a line saying that Tomcat was > > > > stopped... > > > > > > > > anyway... > > > > Simone > > > > > > > > > > > > > -Messaggio originale- > > > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > > > A: 'Tomcat Users List' > > > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > > > In the script you posted, you aren't doing things the way that a > > > > > RH-installed script would do them. > > > > > > > > > > For example, you aren't sourcing > > > > /etc/rc.d/init.d/functions, you aren't > > > > > calling daemon() or killproc(), etc. etc. etc. > > > > > > > > > > I'm not sure what you want to see...are you saying that your > > > > > script does not > > > > > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > > > > > > > > > If it's just the prompt, copy one of the scripts in > > > > /etc/init.d and insert > > > > > tomcat-specific commands where required. > > > > > > > > > > John > > > > > > > > > > > -Original Message- > > > > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > > > > Sent: Monday, February 17, 2003 4:49 PM > > > > > > To: Tomcat Users List > > > > > > Subject: R: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > Hello, > > > > > > I just got home from work > > > > > > I tried your start/shutdown script but I never see during > > > > > > shutdown a row > > > > > > "Stopping Tomcat [OK]" coming out in the console nor in the > > > > > > /var/log/boot > > > > > > and /var/log/messages > > > > > > > > > > > > I cannot figure out what the problem could be > > > > > > Simo > > > > > > > > > > > > > -Messaggio originale- > > > > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > > > > Inviato: domenic
Re: R: R: R: Startup/shutdown script
H. What does this output?: /sbin/chkconfig --list tomcatd It should output this: tomcatd 0:off 1:off 2:off 3:on4:on5:on6:off Are you doing this all as root? I guess I haven't really looked at my boot process when shutting down. I'll try it. Oscar On Mon, 17 Feb 2003, Simone Chiaretta wrote: > Alreay done > nothing changed > > Simo > > > -Messaggio originale- > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > Inviato: lunedì 17 febbraio 2003 12.05 > > A: Tomcat Users List > > Oggetto: Re: R: R: Startup/shutdown script > > > > > > Why don't you try my script and substitute your environment variables? > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > Go down to the bottom and click on "tomcatd". Save it to > > /etc/rc.d/init.d/tomcatd > > > > Then > > /sbin/chkconfig --del tomcatd #to be safe > > /sbin/chkconfig --add tomcatd > > > > If it works then figure out what's different if you want to learn > > why yours doesn't work. > > > > Oscar > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > I'm saying that the shutdown script is not executing.. > > > I tried putting a debug line in the script but I don't get it on the > > > console... > > > In the catalina.out I don't get a line saying that Tomcat was stopped... > > > > > > anyway... > > > Simone > > > > > > > > > > -Messaggio originale- > > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > > A: 'Tomcat Users List' > > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > > > > > In the script you posted, you aren't doing things the way that a > > > > RH-installed script would do them. > > > > > > > > For example, you aren't sourcing /etc/rc.d/init.d/functions, > > you aren't > > > > calling daemon() or killproc(), etc. etc. etc. > > > > > > > > I'm not sure what you want to see...are you saying that your > > > > script does not > > > > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > > > > > > > If it's just the prompt, copy one of the scripts in > > /etc/init.d and insert > > > > tomcat-specific commands where required. > > > > > > > > John > > > > > > > > > -Original Message- > > > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > > > Sent: Monday, February 17, 2003 4:49 PM > > > > > To: Tomcat Users List > > > > > Subject: R: R: Startup/shutdown script > > > > > > > > > > > > > > > Hello, > > > > > I just got home from work > > > > > I tried your start/shutdown script but I never see during > > > > > shutdown a row > > > > > "Stopping Tomcat [OK]" coming out in the console nor in the > > > > > /var/log/boot > > > > > and /var/log/messages > > > > > > > > > > I cannot figure out what the problem could be > > > > > Simo > > > > > > > > > > > -Messaggio originale- > > > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > > > Inviato: domenica 16 febbraio 2003 15.02 > > > > > > A: Tomcat Users List > > > > > > Oggetto: Re: R: Startup/shutdown script > > > > > > > > > > > > > > > > > > What happens if you shut it down manually (as root)? > > > > > > /etc/rc.d/init.d/tomcat stop > > > > > > > > > > > > I find it easier to put a chkconfig line near the top of > > > > > the script such > > > > > > as: > > > > > > #chkconfig: 345 84 14 > > > > > > #description: Tomcat jakarta JSP server > > > > > > > > > > > > Then you can do this to add all the appropriate symbolic links for > > > > > > shutdown/startup. > > > > > > > > > > > > /sbin/chkconfig --add tomcatd #this will add the > > symbolic links > > > > > > /sbin/chkconfig --list tomcatd
R: R: R: Startup/shutdown script
Alreay done nothing changed Simo > -Messaggio originale- > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > Inviato: lunedì 17 febbraio 2003 12.05 > A: Tomcat Users List > Oggetto: Re: R: R: Startup/shutdown script > > > Why don't you try my script and substitute your environment variables? > > http://daydream.stanford.edu/tomcat/install_web_services.html > > Go down to the bottom and click on "tomcatd". Save it to > /etc/rc.d/init.d/tomcatd > > Then > /sbin/chkconfig --del tomcatd #to be safe > /sbin/chkconfig --add tomcatd > > If it works then figure out what's different if you want to learn > why yours doesn't work. > > Oscar > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > I'm saying that the shutdown script is not executing.. > > I tried putting a debug line in the script but I don't get it on the > > console... > > In the catalina.out I don't get a line saying that Tomcat was stopped... > > > > anyway... > > Simone > > > > > > > -Messaggio originale- > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > A: 'Tomcat Users List' > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > In the script you posted, you aren't doing things the way that a > > > RH-installed script would do them. > > > > > > For example, you aren't sourcing /etc/rc.d/init.d/functions, > you aren't > > > calling daemon() or killproc(), etc. etc. etc. > > > > > > I'm not sure what you want to see...are you saying that your > > > script does not > > > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > > > > > If it's just the prompt, copy one of the scripts in > /etc/init.d and insert > > > tomcat-specific commands where required. > > > > > > John > > > > > > > -Original Message- > > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, February 17, 2003 4:49 PM > > > > To: Tomcat Users List > > > > Subject: R: R: Startup/shutdown script > > > > > > > > > > > > Hello, > > > > I just got home from work > > > > I tried your start/shutdown script but I never see during > > > > shutdown a row > > > > "Stopping Tomcat [OK]" coming out in the console nor in the > > > > /var/log/boot > > > > and /var/log/messages > > > > > > > > I cannot figure out what the problem could be > > > > Simo > > > > > > > > > -Messaggio originale- > > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > > Inviato: domenica 16 febbraio 2003 15.02 > > > > > A: Tomcat Users List > > > > > Oggetto: Re: R: Startup/shutdown script > > > > > > > > > > > > > > > What happens if you shut it down manually (as root)? > > > > > /etc/rc.d/init.d/tomcat stop > > > > > > > > > > I find it easier to put a chkconfig line near the top of > > > > the script such > > > > > as: > > > > > #chkconfig: 345 84 14 > > > > > #description: Tomcat jakarta JSP server > > > > > > > > > > Then you can do this to add all the appropriate symbolic links for > > > > > shutdown/startup. > > > > > > > > > > /sbin/chkconfig --add tomcatd #this will add the > symbolic links > > > > > /sbin/chkconfig --list tomcatd #this will tell you how > > > > it starts up > > > > > /sbin/chkconfig --del tomcatd #this will get rid of all > > > > > symbolic links > > > > > > > > > > I use RedHat 7.3 and I published my HOWTO along with > daemon scripts: > > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > > > Thanx > > > > > > I've tried everything, but it seems like the script is not > > > > > executed when the > > > > > > server shutdown > > > > > > > > > > > > during the startup I see.. > > > > > > > > &
Re: R: R: Startup/shutdown script
Why don't you try my script and substitute your environment variables? http://daydream.stanford.edu/tomcat/install_web_services.html Go down to the bottom and click on "tomcatd". Save it to /etc/rc.d/init.d/tomcatd Then /sbin/chkconfig --del tomcatd #to be safe /sbin/chkconfig --add tomcatd If it works then figure out what's different if you want to learn why yours doesn't work. Oscar On Mon, 17 Feb 2003, Simone Chiaretta wrote: > I'm saying that the shutdown script is not executing.. > I tried putting a debug line in the script but I don't get it on the > console... > In the catalina.out I don't get a line saying that Tomcat was stopped... > > anyway... > Simone > > > > -Messaggio originale- > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > Inviato: lunedì 17 febbraio 2003 22.58 > > A: 'Tomcat Users List' > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > In the script you posted, you aren't doing things the way that a > > RH-installed script would do them. > > > > For example, you aren't sourcing /etc/rc.d/init.d/functions, you aren't > > calling daemon() or killproc(), etc. etc. etc. > > > > I'm not sure what you want to see...are you saying that your > > script does not > > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > > > If it's just the prompt, copy one of the scripts in /etc/init.d and insert > > tomcat-specific commands where required. > > > > John > > > > > -Original Message- > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, February 17, 2003 4:49 PM > > > To: Tomcat Users List > > > Subject: R: R: Startup/shutdown script > > > > > > > > > Hello, > > > I just got home from work > > > I tried your start/shutdown script but I never see during > > > shutdown a row > > > "Stopping Tomcat [OK]" coming out in the console nor in the > > > /var/log/boot > > > and /var/log/messages > > > > > > I cannot figure out what the problem could be > > > Simo > > > > > > > -Messaggio originale- > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > Inviato: domenica 16 febbraio 2003 15.02 > > > > A: Tomcat Users List > > > > Oggetto: Re: R: Startup/shutdown script > > > > > > > > > > > > What happens if you shut it down manually (as root)? > > > > /etc/rc.d/init.d/tomcat stop > > > > > > > > I find it easier to put a chkconfig line near the top of > > > the script such > > > > as: > > > > #chkconfig: 345 84 14 > > > > #description: Tomcat jakarta JSP server > > > > > > > > Then you can do this to add all the appropriate symbolic links for > > > > shutdown/startup. > > > > > > > > /sbin/chkconfig --add tomcatd #this will add the symbolic links > > > > /sbin/chkconfig --list tomcatd #this will tell you how > > > it starts up > > > > /sbin/chkconfig --del tomcatd #this will get rid of all > > > > symbolic links > > > > > > > > I use RedHat 7.3 and I published my HOWTO along with daemon scripts: > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > 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 > &
R: R: Startup/shutdown script
I installed it also with chkconfig after u told me... so now it's with K11tomact in rc0.d I tried calling the file directly, too... and when I call the script manually the server stops... > -Messaggio originale- > Da: Turner, John [mailto:[EMAIL PROTECTED]] > Inviato: lunedì 17 febbraio 2003 23.20 > A: 'Tomcat Users List' > Oggetto: RE: R: Startup/shutdown script > > > > Where do you have it? What run level? > > What is the entry for it? Is it a "K" entry or a "S" entry? > > What happens if you remove the "cd $CATALINA_HOME/bin" entries, > and instead > call the scripts directly, like this: > > $CATALINA_HOME/bin/shutdown.sh > > John > > > > -Original Message- > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > Sent: Monday, February 17, 2003 5:17 PM > > To: Tomcat Users List > > Subject: R: R: Startup/shutdown script > > > > > > I'm saying that the shutdown script is not executing.. > > I tried putting a debug line in the script but I don't get it on the > > console... > > In the catalina.out I don't get a line saying that Tomcat was > > stopped... > > > > anyway... > > Simone > > > > > > > -Messaggio originale- > > > Da: Turner, John [mailto:[EMAIL PROTECTED]] > > > Inviato: lunedì 17 febbraio 2003 22.58 > > > A: 'Tomcat Users List' > > > Oggetto: RE: R: Startup/shutdown script > > > > > > > > > > > > In the script you posted, you aren't doing things the way that a > > > RH-installed script would do them. > > > > > > For example, you aren't sourcing > > /etc/rc.d/init.d/functions, you aren't > > > calling daemon() or killproc(), etc. etc. etc. > > > > > > I'm not sure what you want to see...are you saying that your > > > script does not > > > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > > > > > If it's just the prompt, copy one of the scripts in > > /etc/init.d and insert > > > tomcat-specific commands where required. > > > > > > John > > > > > > > -Original Message- > > > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, February 17, 2003 4:49 PM > > > > To: Tomcat Users List > > > > Subject: R: R: Startup/shutdown script > > > > > > > > > > > > Hello, > > > > I just got home from work > > > > I tried your start/shutdown script but I never see during > > > > shutdown a row > > > > "Stopping Tomcat [OK]" coming out in the console nor in the > > > > /var/log/boot > > > > and /var/log/messages > > > > > > > > I cannot figure out what the problem could be > > > > Simo > > > > > > > > > -Messaggio originale- > > > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > > > Inviato: domenica 16 febbraio 2003 15.02 > > > > > A: Tomcat Users List > > > > > Oggetto: Re: R: Startup/shutdown script > > > > > > > > > > > > > > > What happens if you shut it down manually (as root)? > > > > > /etc/rc.d/init.d/tomcat stop > > > > > > > > > > I find it easier to put a chkconfig line near the top of > > > > the script such > > > > > as: > > > > > #chkconfig: 345 84 14 > > > > > #description: Tomcat jakarta JSP server > > > > > > > > > > Then you can do this to add all the appropriate > > symbolic links for > > > > > shutdown/startup. > > > > > > > > > > /sbin/chkconfig --add tomcatd #this will add the > > symbolic links > > > > > /sbin/chkconfig --list tomcatd #this will tell you how > > > > it starts up > > > > > /sbin/chkconfig --del tomcatd #this will get rid of all > > > > > symbolic links > > > > > > > > > > I use RedHat 7.3 and I published my HOWTO along with > > daemon scripts: > > > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > > > > > Thanx > > > > > > I've tried everything,
R: R: Startup/shutdown script
I'm saying that the shutdown script is not executing.. I tried putting a debug line in the script but I don't get it on the console... In the catalina.out I don't get a line saying that Tomcat was stopped... anyway... Simone > -Messaggio originale- > Da: Turner, John [mailto:[EMAIL PROTECTED]] > Inviato: lunedì 17 febbraio 2003 22.58 > A: 'Tomcat Users List' > Oggetto: RE: R: Startup/shutdown script > > > > In the script you posted, you aren't doing things the way that a > RH-installed script would do them. > > For example, you aren't sourcing /etc/rc.d/init.d/functions, you aren't > calling daemon() or killproc(), etc. etc. etc. > > I'm not sure what you want to see...are you saying that your > script does not > stop Tomcat, or just that you don't get the pretty "OK" prompt? > > If it's just the prompt, copy one of the scripts in /etc/init.d and insert > tomcat-specific commands where required. > > John > > > -Original Message----- > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > Sent: Monday, February 17, 2003 4:49 PM > > To: Tomcat Users List > > Subject: R: R: Startup/shutdown script > > > > > > Hello, > > I just got home from work > > I tried your start/shutdown script but I never see during > > shutdown a row > > "Stopping Tomcat [OK]" coming out in the console nor in the > > /var/log/boot > > and /var/log/messages > > > > I cannot figure out what the problem could be > > Simo > > > > > -Messaggio originale- > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > Inviato: domenica 16 febbraio 2003 15.02 > > > A: Tomcat Users List > > > Oggetto: Re: R: Startup/shutdown script > > > > > > > > > What happens if you shut it down manually (as root)? > > > /etc/rc.d/init.d/tomcat stop > > > > > > I find it easier to put a chkconfig line near the top of > > the script such > > > as: > > > #chkconfig: 345 84 14 > > > #description: Tomcat jakarta JSP server > > > > > > Then you can do this to add all the appropriate symbolic links for > > > shutdown/startup. > > > > > > /sbin/chkconfig --add tomcatd #this will add the symbolic links > > > /sbin/chkconfig --list tomcatd #this will tell you how > > it starts up > > > /sbin/chkconfig --del tomcatd #this will get rid of all > > > symbolic links > > > > > > I use RedHat 7.3 and I published my HOWTO along with daemon scripts: > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > 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` > >
R: R: Startup/shutdown script
Hello, I just got home from work I tried your start/shutdown script but I never see during shutdown a row "Stopping Tomcat [OK]" coming out in the console nor in the /var/log/boot and /var/log/messages I cannot figure out what the problem could be Simo > -Messaggio originale- > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > Inviato: domenica 16 febbraio 2003 15.02 > A: Tomcat Users List > Oggetto: Re: R: Startup/shutdown script > > > What happens if you shut it down manually (as root)? > /etc/rc.d/init.d/tomcat stop > > I find it easier to put a chkconfig line near the top of the script such > as: > #chkconfig: 345 84 14 > #description: Tomcat jakarta JSP server > > Then you can do this to add all the appropriate symbolic links for > shutdown/startup. > > /sbin/chkconfig --add tomcatd #this will add the symbolic links > /sbin/chkconfig --list tomcatd #this will tell you how it starts up > /sbin/chkconfig --del tomcatd #this will get rid of all > symbolic links > > I use RedHat 7.3 and I published my HOWTO along with daemon scripts: > http://daydream.stanford.edu/tomcat/install_web_services.html > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > 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 > > > > processDoes 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: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > >
R: R: Startup/shutdown script
ThanX I manage linux at home becuase when I'm at work I cannot access the linux box (due to firewall restrictions where I work) I run a linux box on my own, not for my principal job Simo > -Messaggio originale- > Da: Turner, John [mailto:[EMAIL PROTECTED]] > Inviato: lunedì 17 febbraio 2003 14.33 > A: 'Tomcat Users List' > Oggetto: RE: R: Startup/shutdown script > > > > man chkconfig > > "chkconfig provides a simple command-line tool for maintaining the > /etc/rc[0-6].d directory hierarchy by relieving system > administrators of the > task of directly manipulating the numerous symbolic links in those > directories." > > John > > > -Original Message- > > From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] > > Sent: Monday, February 17, 2003 3:57 AM > > To: Tomcat Users List > > Subject: R: R: Startup/shutdown script > > > > > > Hello Oscar, > > when I "/etc/rc.d/init.d/tomcat stop" manually the service is > > stopped > > > > btw... what does the chkconfig is? > > Thank you > > Simone > > > > PS: I saw your script on the page and (restart and status > > options apart) > > it's like mine... > > > > > -Messaggio originale- > > > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > > > Inviato: domenica 16 febbraio 2003 15.02 > > > A: Tomcat Users List > > > Oggetto: Re: R: Startup/shutdown script > > > > > > > > > What happens if you shut it down manually (as root)? > > > /etc/rc.d/init.d/tomcat stop > > > > > > I find it easier to put a chkconfig line near the top of > > the script such > > > as: > > > #chkconfig: 345 84 14 > > > #description: Tomcat jakarta JSP server > > > > > > Then you can do this to add all the appropriate symbolic links for > > > shutdown/startup. > > > > > > /sbin/chkconfig --add tomcatd #this will add the symbolic links > > > /sbin/chkconfig --list tomcatd #this will tell you how > > it starts up > > > /sbin/chkconfig --del tomcatd #this will get rid of all > > > symbolic links > > > > > > I use RedHat 7.3 and I published my HOWTO along with daemon scripts: > > > http://daydream.stanford.edu/tomcat/install_web_services.html > > > > > > > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > > > > > 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 ins
R: R: Startup/shutdown script
Hello Oscar, when I "/etc/rc.d/init.d/tomcat stop" manually the service is stopped btw... what does the chkconfig is? Thank you Simone PS: I saw your script on the page and (restart and status options apart) it's like mine... > -Messaggio originale- > Da: Oscar Carrillo [mailto:[EMAIL PROTECTED]] > Inviato: domenica 16 febbraio 2003 15.02 > A: Tomcat Users List > Oggetto: Re: R: Startup/shutdown script > > > What happens if you shut it down manually (as root)? > /etc/rc.d/init.d/tomcat stop > > I find it easier to put a chkconfig line near the top of the script such > as: > #chkconfig: 345 84 14 > #description: Tomcat jakarta JSP server > > Then you can do this to add all the appropriate symbolic links for > shutdown/startup. > > /sbin/chkconfig --add tomcatd #this will add the symbolic links > /sbin/chkconfig --list tomcatd #this will tell you how it starts up > /sbin/chkconfig --del tomcatd #this will get rid of all > symbolic links > > I use RedHat 7.3 and I published my HOWTO along with daemon scripts: > http://daydream.stanford.edu/tomcat/install_web_services.html > > > On Mon, 17 Feb 2003, Simone Chiaretta wrote: > > > 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 > > > > processDoes 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: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > -
R: R: Startup/shutdown script
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 > > > > processDoes 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-