tomcat不能shutdown

今天发现tomcat不能shutdown,查看输出日志显示:
SEVERE: Protocol handler pause failed
java.net.ConnectException: Connection timed out
        at 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:218)
        at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:492)
        at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:288)
        at org.apache.jk.server.JkMain.pause(JkMain.java:726)
        at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
        at org.apache.catalina.connector.Connector.pause(Connector.java:1064)
        at org.apache.catalina.core.StandardService.stop(StandardService.java:578)
        at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:662)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
        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.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)




原因查明是linux系统的hosts设置错误。

当本主机名的IP地址设置为另一台机器。

查看本机主机名命令:hostname
查看本机主机IP地址:hostname -i

发现与/etc/sysconfig/network-scripts/ifcfg-eth0文件中的不一致。
主机名设置在/etc/sysconfig/network文件中。

你可能感兴趣的:(shutdown)