SEVERE: Could not contact [localhost:8005] (base port [8005] and offset [0]). Tomcat may not be runn

linux,在tomcat  bin目录下,使用 shutdown.sh  关闭时,报错:

SEVERE: Could not contact [localhost:8005] (base port [8005] and offset [0]). Tomcat may not be running.
Jul 17, 2019 10:02:02 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Error stopping Catalina
java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at java.net.Socket.(Socket.java:434)
        at java.net.Socket.(Socket.java:211)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:513)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:390)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:480)
 

SEVERE: Could not contact [localhost:8005] (base port [8005] and offset [0]). Tomcat may not be runn_第1张图片

这个问题是Tomcat内存导致的,可以修改下Tomcat内存,切换到bin目录下面,使用

vi catalina.sh

修改catalina.sh文件,在位置cygwin=false前,插入以下内容

JAVA_OPTS="-Xms512m -Xmx1024m -Xss2048K -XX:PermSize=256m -XX:MaxPermSize=512m" 

 重启Tomcat即可。

SEVERE: Could not contact [localhost:8005] (base port [8005] and offset [0]). Tomcat may not be runn_第2张图片

你可能感兴趣的:(server)