You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jarrod <ja...@gmail.com> on 2008/03/17 00:08:06 UTC
What is the best way to stop the tomcat daemon?
Hi. I'm working on getting the Tomcat daemon running using jsvc. I've got it
basically running (thanks, Rainer). Now I'm not sure what is the best way to
stop it and to restart it.
If I call # ps aux | grep tomcat this is what I get:
[root@ebdb bin]# ps aux | grep tomcat
root 4305 0.0 0.2 45856 1208 pts/0 S 18:30 0:00 su tomcat
tomcat 4306 0.0 0.2 10856 1476 pts/0 S+ 18:30 0:00 bash
root 4494 0.0 0.0 8000 340 ? Ss 18:58 0:00 jsvc.exec
-cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile
./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat
root 4495 1.2 4.5 336120 23724 ? Sl 18:58 0:00 jsvc.exec
-cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile
./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat
root 4511 0.0 0.1 5984 568 pts/1 S+ 18:58 0:00 grep tomcat
I could just run # kill -9 4494 and 4495, but I'm not sure it's correct to
do that. Maybe it will leave things in a messed up state? Any knowledgeable
advice would be appreciated.
Also, what if I just want to restart Tomcat?
Thanks,
Ethan
-----
--------------------
ebdb
http://aeondust.com
--
View this message in context: http://www.nabble.com/What-is-the-best-way-to-stop-the-tomcat-daemon--tp16085458p16085458.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: What is the best way to stop the tomcat daemon?
Posted by jarrod <ja...@gmail.com>.
David Smith-2 wrote:
>
> You should have gotten a sample service shell script in you jsvc
> source. Mine has this in the stop portion:
>
> jsvc -stop -pidfile $PID_FILE org.apache.catalina.startup.Bootstrap
>
> $PID_FILE is a shell variable containing the path of a file with the
> process id of the running jsvc. I customized the sample service script
> and dropped it in the /etc/init.d folder so I could use service tomcat55
> start|stop
>
> --David
>
>
Works great. Thanks!
Ethan
--
View this message in context: http://www.nabble.com/What-is-the-best-way-to-stop-the-tomcat-daemon--tp16085458p16094692.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: What is the best way to stop the tomcat daemon?
Posted by David Smith <dn...@cornell.edu>.
You should have gotten a sample service shell script in you jsvc
source. Mine has this in the stop portion:
jsvc -stop -pidfile $PID_FILE org.apache.catalina.startup.Bootstrap
$PID_FILE is a shell variable containing the path of a file with the
process id of the running jsvc. I customized the sample service script
and dropped it in the /etc/init.d folder so I could use service tomcat55
start|stop
--David
jarrod wrote:
> Hi. I'm working on getting the Tomcat daemon running using jsvc. I've got it
> basically running (thanks, Rainer). Now I'm not sure what is the best way to
> stop it and to restart it.
>
> If I call # ps aux | grep tomcat this is what I get:
>
> [root@ebdb bin]# ps aux | grep tomcat
> root 4305 0.0 0.2 45856 1208 pts/0 S 18:30 0:00 su tomcat
> tomcat 4306 0.0 0.2 10856 1476 pts/0 S+ 18:30 0:00 bash
> root 4494 0.0 0.0 8000 340 ? Ss 18:58 0:00 jsvc.exec
> -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile
> ./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat
> root 4495 1.2 4.5 336120 23724 ? Sl 18:58 0:00 jsvc.exec
> -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile
> ./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat
> root 4511 0.0 0.1 5984 568 pts/1 S+ 18:58 0:00 grep tomcat
>
> I could just run # kill -9 4494 and 4495, but I'm not sure it's correct to
> do that. Maybe it will leave things in a messed up state? Any knowledgeable
> advice would be appreciated.
>
> Also, what if I just want to restart Tomcat?
>
> Thanks,
>
> Ethan
>
> -----
> --------------------
> ebdb
> http://aeondust.com
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org