Booting, shutting down of Tomcat under Linux

Source: Internet
Author: User

Under the Linux system, start and close tomcat using command operations.

Go to the bin directory under Tomcat

1 cd/java/tomcat/bin

Start the Tomcat command

1 ./startup.sh

Stop the Tomcat Service command

1 ./shutdown.sh

After the Tomcat/shutdown.sh is executed, the Tomcat service does not have normal access, but Ps-ef | After grep Tomcat, it was found that the Java process for Tomcat was not destroyed with the Web container shutting down, and there was a zombie Java process. The cause of the zombie process on the Internet may be the presence of a non-daemon thread (that is, the user thread), and the JVM will not exit (the JVM can exit when all the threads in the JVM are daemons), and if there is one or more non-daemons, the JVM will not exit. Check to see if the Tomcat process has ended with a command:

1 ps-ef|greptomcat

If a similar message is displayed, the Tomcat process is not finished

1 gateway  14705 14703 12 08:29 pts/000:03:10 /www/websoft/java/java1/jdk1.7.0_25/jre/bin/java-Djava.util.logging.config.file=/www/websoft/tomcat1/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -Xms1536m -Xmx1536m -Xss256k -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:ParallelGCThreads=20 -XX:+UseParallelOldGC -XX:MaxGCPauseMillis=100 -XX:+UseAdaptiveSizePolicy -Djava.endorsed.dirs=/endorsed-classpath /www/websoft/tomcat1/bin/bootstrap.jar:/www/websoft/tomcat1/bin/tomcat-juli.jar -Dcatalina.base=/www/websoft/tomcat1-Dcatalina.home=/www/websoft/tomcat1-Djava.io.tmpdir=/www/websoft/tomcat1/temporg.apache.catalina.startup.Bootstrap start

At this point we can force the end of the process (zombie process)

1 kill-9 14705

After the last command is completed, the Tomcat process is re-viewed and Tomcat is completely stopped.

Booting, shutting down of Tomcat under Linux

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.