tomcat shutdown.sh结束不了,Could not contact localhost:8005
Posted chongchong88
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat shutdown.sh结束不了,Could not contact localhost:8005相关的知识,希望对你有一定的参考价值。
使用./shutdown.sh关闭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.<init>(Socket.java:425)
at java.net.Socket.<init>(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)
这个问题是Tomcat内存导致的,可以修改下Tomcat内存,切换到bin目录下面,使用
vi catalina.sh
修改catalina.sh文件,在位置cygwin=false前,插入以下内容
JAVA_OPTS="-Xms512m -Xmx1024m -Xss2048K -XX:PermSize=256m -XX:MaxPermSize=512m"
重启Tomcat即可。
以上是关于tomcat shutdown.sh结束不了,Could not contact localhost:8005的主要内容,如果未能解决你的问题,请参考以下文章
Centos打开关闭结束tomcat,及查看tomcat运行日志
Centos打开关闭结束tomcat,及查看tomcat运行日志
Centos打开关闭结束tomcat,及查看tomcat运行日志