tomcat shutdown.sh結束不了,Could not contact localhost:8005

tomcat shutdown.sh結束不了,Could not contact localhost:8005

2018年01月25日 11:22:49 夢裏斷魂 閱讀數:2493更多java

我的分類: exceptionapache

使用./shutdown.sh關閉Tomcat,有時會關閉成功,有時會出現關閉錯誤;tomcat

Jul 06, 2017 10:57:37 AM org.apache.catalina.startup.Catalina stopServer 
SEVERE: Could not contact localhost:8005. Tomcat may not be running. 
Jul 06, 2017 10:57:37 AM 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:450) 
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:400) 
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:487)socket

這個問題是Tomcat內存致使的,能夠修改下Tomcat內存,切換到bin目錄下面,使用spa

vi catalina.sh.net

修改catalina.sh文件,在位置cygwin=false前,插入如下內容blog

JAVA_OPTS=」-Xms512m -Xmx1024m -Xss2048K -XX:PermSize=256m -XX:MaxPermSize=512m」內存

重啓Tomcat便可。get

相關文章
相關標籤/搜索