In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how linux shuts down tomcat". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Method: 1, open the bin file in tomcat after using ". /" to close tomcat, syntax is ". / shutdown.sh"; 2, open bin file in tomcat after using "sh" to close tomcat, syntax is "sh shutdown.sh".
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How does linux shut down tomcat?
First enter the bin in your tomcat file, using the cd command line, for example:
Cd / usr/local/tomcat/apache-tomcat-9.0.1/bin
After entering the bin file, use the ls command to open the bin file, for example:
# ls
When opened, it is displayed as follows:
Bootstrap.jar catalina-tasks.xml configtest.bat digest.bat setclasspath.sh startup.bat tomcat-native.tar.gz version.batcatalina.bat commons-daemon.jar configtest.sh digest.sh shutdown.bat startup.sh tool-wrapper.bat version.shcatalina.sh commons-daemon-native.tar.gz daemon.sh setclasspath.bat shutdown.sh tomcat-juli.jar tool-wrapper.sh
At this point, there are two ways to start tomcat. The first is to use. / directly, such as:
. / startup.sh
Turn off tomcat:
. / shutdown.sh
The second is to use sh, such as:
Start tomcat
Sh startup.sh
Close tomcat
Sh shutdown.sh
After executing tomcat. / shutdown.sh, although the tomcat service cannot be accessed normally, after ps-ef | grep tomcat, it is found that the java process corresponding to tomcat is not destroyed as the web container is closed, so there is a zombie java process. Check whether the Tomcat process ends with the following command:
Ps-ef | grep tomcat
If a similar message is displayed, the Tomcat process has not ended
Root 28645 0 09:52 pts/1 00:00:00 grep-- color=auto tomcatroot 32683 1 2 09:48 pts/1 00:00:06 / usr/java/jdk1.8.0_151/bin/java-Djava.util.logging.config.file=/usr/local/tomcat/apache-tomcat-9.0.1/conf/logging.properties-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager-Djdk.tls.ephemeralDHKeySize=2048-Djava.protocol.handler.pkgs=org. Apache.catalina.webresources-classpath / usr/local/tomcat/apache-tomcat-9.0.1/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-9.0.1/bin/tomcat-juli.jar-Dcatalina.base=/usr/local/tomcat/apache-tomcat-9.0.1-Dcatalina.home=/usr/local/tomcat/apache-tomcat-9.0.1-Djava.io.tmpdir=/usr/local/tomcat/apache-tomcat-9.0.1/temp org.apache.catalina.startup.Bootstrap start
At this point, we can forcibly end the process (zombie process) and use kill to kill the process, where the signal number of-9 means mandatory to terminate a process as soon as possible.
Kill-9 32683
Another query will find that Tomcat has stopped completely.
If the command is incorrectly typed, you can use ctrl+c,ctrl+], ctrl+d to end the instruction with different commands for different situations.
That's all for "how linux shuts down tomcat". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.