Linux Tomcat shutdown.sh does not shut down properly

Source: Internet
Author: User

This is generally caused by the presence of non-daemon threads in the project

The basic principle is to log the process ID (PID) that starts Tomcat when Tomcat is started, forcing the process to kill when it is closed

1. Find Tomcat under Bin/catalina.sh file, vi to add something, mainly record Tomcat PID, as follows:

About the 125th line, add the following code

#设置CATALINA_PID (after addition)
If [-Z "$CATALINA _pid"]; Then
Catalina_pid= $PRGDIR/catalina_pid
Cat $CATALINA _pid
Fi

Save it.

2.vi into the shutdown.sh file, the last line below the red circle-force:

Save it.

Resources:

47294295

Linux Tomcat shutdown.sh does not shut down properly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.