Tomcat-shutdown.sh报错but has failed to stop it. This is very likely to create a memory leak.

报这一个错的会出现web已经无法访问了,但在服务器上查看tomcat进程发现进程还存在。
解决方法:
修改shutdown.sh脚本:加上强制关闭进程参数

把:exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
改为exec "$PRGDIR"/"$EXECUTABLE" stop -force "$@"

修改catalina.sh脚本

# Get standard environment variables
PRGDIR=`dirname "$PRG"`  

在以上面的脚本下添加如下代码:

if [ -z "$CATALINA_PID" ]; then
      CATALINA_PID=$PRGDIR/CATALINA_PID
      cat $CATALINA_PID
fi

至此shutdown.sh脚本可以强制关闭tomcat进程了。

你可能感兴趣的:(tomcat)