linux下强制关闭tomcat

1、设置 CATALINA_PID

vi /opt/java/tomcat/c4/catalina.sh

CATALINA_PID='/tmp/c4.pid'

2、启动tomcat

./catalina.sh start

Using CATALINA_BASE:   /opt/java/tomcat/c4
Using CATALINA_HOME:   /opt/java/tomcat/c4
Using CATALINA_TMPDIR: /opt/java/tomcat/c4/temp
Using JRE_HOME:        /opt/java/jdk/current/jre
Using CLASSPATH:       /opt/java/tomcat/c4/bin/bootstrap.jar:/opt/java/tomcat/c4/bin/tomcat-juli.jar
Using CATALINA_PID:    /tmp/c4.pid

3、强制关闭tomcat
./catalina.sh stop 0 -force

Using CATALINA_BASE:   /opt/java/tomcat/c4
Using CATALINA_HOME:   /opt/java/tomcat/c4
Using CATALINA_TMPDIR: /opt/java/tomcat/c4/temp
Using JRE_HOME:        /opt/java/jdk/current/jre
Using CLASSPATH:       /opt/java/tomcat/c4/bin/bootstrap.jar:/opt/java/tomcat/c4/bin/tomcat-juli.jar
Using CATALINA_PID:    /tmp/c4.pid
Killing Tomcat with the PID: 8816
stop n -force     Stop Catalina, wait up to n seconds and then use kill -KILL if still running

./catalina.sh stop 0 -force是先通过调用Tomcat的shutdown端口关闭,然后再kill进程。

原创文章,转载请注明: 转载自海波无痕

本文链接地址: linux下强制关闭tomcat

文章的脚注信息由WordPress的wp-posturl插件自动生成

此条目发表在server分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

评论链接可以 移除 nofollow.