How to Solve The Process Still Exsit after Tomcat Shutdown

Reason: After shutdown the actual jvm process is not launched, but the port is released, the reason for not launching is that there are non-daemon processes that do not exit, resulting in jvm not launched, resulting in tomcat startup process is not finished
Solution: Save the pid of the tomcat startup process, and force the pid to be turned off during shutdown.

[[email protected] pc1]# vi bin/

#   CATALINA_PID    (Optional) Path of the file which should contains the pid
#                   of the catalina startup java process, when start (fork) is
#                   used


//Create a directory
[[email protected] pc1]# mkdir -p /project/pid/pc1/

//Set force close, modify trailing line to add -force
[[email protected] pc1]# vi  bin/

exec "$PRGDIR"/"$EXECUTABLE" stop -force "[email protected]"

//  Test Pass

Similar Posts: