Starting and shutting down Tomcat under Linux In Linux system, start and stop Tomcat using command operations. Enter the bin directory under Tomcat cd /java/tomcat/bin Start Tomcat Command ./startup.sh Stop Tomcat service command ./shutdown.sh After executing tomcat ./shutdown.sh, although the tomcat service cannot be accessed normally, after running ps -ef | grep tomcat, it is found that the java process corresponding to tomcat is not destroyed when the web container is shut down, and zombie java processes exist. I looked up on the Internet and found that the cause of the zombie process may be the existence of a non-daemon thread (i.e. User Thread), and the JVM will not exit (when all threads in the JVM are daemon threads, the JVM can exit; if there is one or more non-daemon threads, the JVM will not exit). Use the following command to check whether the Tomcat process has ended: ps -ef|grep tomcat If similar information is displayed, it means that the Tomcat process has not ended.
At this point we can force the process to end (zombie process) kill -9 14705 After the previous command is executed, check the Tomcat process again and you will find that Tomcat has completely stopped. Several ways to run Tomcat on Linux Start, shut down and error tracking of the tomcat service under Linux. After using PuTTy to remotely connect to the server, the tomcat service is usually started and shut down in the following ways: Start the tomcat service Method 1: Start Method 2: Start as a service Method 3: Start the console dynamic output mode./catalina.sh explain: There is a disadvantage of starting Tomcat through method 1 and method 3. When the client connection is disconnected, the Tomcat service will stop immediately. Through method 2, it can run as a Linux service all the time. The logs of Tomcat started by method 1 or method 2 will be written to the corresponding log files, but the output information and error conditions of the Tomcat console cannot be viewed dynamically. Method 3 allows you to start the Tomcat service in console mode and directly view the background console output information when the program is running. You don't have to open the Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
>>: Example usage of JavaScript tamper-proof object
Code implementation: Copy code The code is as fol...
About derived tables When the main query contains...
1.0 Redis persistence Redis is an in-memory datab...
This article mainly introduces the sample code of...
This article uses examples to illustrate the usag...
Configure service startup and shutdown in Linux s...
iOS 1. URL scheme This solution is basically for ...
Table of contents 1. Download MySQL 2. Install My...
Due to your company standards, you may only allow...
There are too many articles about xhtml+css websi...
Question: What is the difference between int(1) a...
In some scenarios, we want to assign multiple IPs...
This article will introduce an interesting pseudo...
Table of contents 1. Constructors and prototypes ...
Sometimes it’s nice to see some nice scroll bar e...