tomcat执行shutdown.sh进程残留的解决办法
<p><span style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);">我们执行shutdown.sh指令的时候有时会发现进程并没有被关掉而是越来越多,这种情况一般是项目造成的,具体原因未去调查。由于tomcat自己有相应的保护机制,所以我们只需要强制结束其进程即可,下面介绍我现在用的一种方法:</span></p><pre class="brush:java;toolbar:false">//添加CATALINA_PID# vi bin/catalina.sh
# CATALINA_PID (Optional) Path of the file which should contains the pid
# of the catalina startup java process, when start (fork) is
# used
CATALINA_PID=/project/pid/pc1/CATALINA_PID
//创建目录
# mkdir -p /project/pid/pc1/
//设置强制关闭,修改尾行添加 -force
# vi bin/shutdown.sh
...
exec "$PRGDIR"/"$EXECUTABLE" stop -force "$@"
//startup.sh shutdown.sh 测试通过</pre><p><span style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);"></span><br/></p>
页:
[1]