SEVERE: Could not contact localhost:8017. Tomcat may not be running.

[root@iZm5eioa9optho1tg3qzo3Z apache-tomcat-7.0.52]# bin/shutdown.sh 
Using CATALINA_BASE:   /usr/local/etc/apache-tomcat-7.0.52
Using CATALINA_HOME:   /usr/local/etc/apache-tomcat-7.0.52
Using CATALINA_TMPDIR: /usr/local/etc/apache-tomcat-7.0.52/temp
Using JRE_HOME:        /usr/local/etc/jdk1.7.0_72/jre
Using CLASSPATH:       /usr/local/etc/apache-tomcat-7.0.52/bin/bootstrap.jar:/usr/local/etc/apache-tomcat-7.0.52/bin/tomcat-juli.jar
Apr 24, 2018 9:20:37 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact localhost:8017. Tomcat may not be running.
Apr 24, 2018 9:20:37 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop: 
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.(Socket.java:425)
        at java.net.Socket.(Socket.java:208)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:498)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:370)

        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:457)

解决:server.xml里的”SHUTDOWN”端口,<Server port="8017" shutdown="SHUTDOWN">然后有startup.sh 了一番(由于关不掉所以之前的直接kill了)然后执行shutdown.sh 你猜怎么着???竟然好了!!全部正常!解决! 
ps:/etc/profile里不用配置tomcat的信息,tomcat会自己识别。。

你可能感兴趣的:(SEVERE: Could not contact localhost:8017. Tomcat may not be running.)