Tomcat Command Error: Catalina.stop: connect reused solution

The following error message appears when you execute the close Tomcat command on the server

[root@server classes]# service tomcat restart
Stopping Tomcat service:  Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:       /usr
Apr 17, 2011 10:11:53 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop: Connection refused
    at Method)
    at org.apache.catalina.startup.Catalina.stopServer(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.apache.catalina.startup.Bootstrap.stopServer(
    at org.apache.catalina.startup.Bootstrap.main(

Then check the relevant information. On the stack overflow website, it says that it may be a CentOS firewall problem. Check the firewall configuration file, and the 8005 port has been configured. Then close the firewall, and it is still connection refused

Then use the telnet command to test. First test telnet 80, normal, then telnet 8005, normal, later test telnet localhost 80, abnormal connection refused, telnet localhost 8005, also abnormal, connection refused

It should be the problem of localhost parsing

#vim /etc/hosts

View the local hosts configuration file   IT2YWMHA01 localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Modify localhost, add it to, and change it to   IT2YWMHA01 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost.localdomain localhost6 localhost6.localdomain6

Test #sh, now it can shut down Tomcat normally and no longer prompts Connection refused.


Similar Posts: