Discussion:
What is the best way to stop the tomcat daemon?
jarrod
2008-03-16 23:08:06 UTC
Permalink
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:

[***@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: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
David Smith
2008-03-17 01:52:27 UTC
Permalink
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
Post by jarrod
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.
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: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
jarrod
2008-03-17 15:50:08 UTC
Permalink
Post by David Smith
You should have gotten a sample service shell script in you jsvc
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: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Loading...