Error message when you run the shutdown.sh command to close Tomcat on a Linux system

Source: Internet
Author: User

Server: Linnux 5.5 64-bit, installed JDK;

Tomcat version: apache-tomcat-7.0.53

Operating software: Xshell 4 (free for Home/school)

Just started to restart the Tomcat, but the browser access to the site has been stuck, it may be tomcat problem, so in the Xshell input command ps-ef|grep Java to see if there is tomcat in the process, such as:

As the above message appears stating that the Tomcat process exists, running shutdown.sh and Ps-ef|grep Java again to see that the process is still unable to end, I forcibly end the process. Deadly, I kill the wrong process, for example, should be killed 29053, but the 29378 to kill, resulting in the consequences of running shutdown.sh again, the following error occurred.

[[email protected] bin]# ./shutdown.shusing catalina_base:   /opt/ tomcatusing catalina_home:   /opt/tomcatusing catalina_tmpdir: /opt/tomcat/ tempusing jre_home:        /usr/java/jdk1.6.0_22using  classpath:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/ tomcat-juli.jarapr 17, 2014 11:14:50 am org.apache.catalina.startup.catalina  Stopserversevere: could not contact localhost:8005. tomcat may not be  running. Apr 17, 2014 11:14:50 am org.apache.catalina.startup.catalina stopserversevere:  Catalina.stop: java.net.ConnectException: Connection refusedat  Java.net.PlainSocketImpl.socketConnect (Native method) At java.net.plainsocketimpl.doconnect ( plainsocketimpl.java:333) At java.net.plainsocketimpl.conneCttoaddress (plainsocketimpl.java:195) at java.net.plainsocketimpl.connect (PlainSocketImpl.java:182) at  java.net.sockssocketimpl.connect (sockssocketimpl.java:366) at java.net.socket.connect (Socket.java : 529) At java.net.socket.connect (socket.java:478) at java.net.socket.<init> (Socket.java:375) at  java.net.Socket.<init> (socket.java:189) At org.apache.catalina.startup.catalina.stopserver ( catalina.java:498) at sun.reflect.nativemethodaccessorimpl.invoke0 (Native method) at  Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39) at  Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25) at  Java.lang.reflect.Method.invoke (method.java:597) At org.apache.catalina.startup.bootstrap.stopserver ( bootstrap.java:370) At org.apache.catalina.startup.bootstrap.main (bootstrap.java:457) [[email  protected] bin]#

Such as:

Repeatedly, the problem remains unresolved, including restarting the Linux system with the reboot command.

But strangely, after more than 10 minutes, respectively run shutdown.sh and startup.sh again, found that the above problems have not appeared, Tomcat resumed normal, do not know what is going on.

After a number of such problems, and then finally found that Tomcat is too small memory, need to add virtual memory to Tomcat, increase the memory of Tomcat, the problem is resolved, and finally can shut down or start tomcat again. Click here to view: How to modify Tomcat memory in a Linux system.

Error message when you run the shutdown.sh command to close Tomcat on a Linux system

Related Article

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.