严重 [main] org.apache.catalina.startup.Catalina.stopServer 无法联系[localhost:8005](

tomcat成功启动,但是执行shutdown.bat时出现报错:

【严重 [main] org.apache.catalina.startup.Catalina.stopServer 无法联系[localhost:8005](基端口[8005]和偏移量[0])。Tomcat可能不在运行。
19-Oct-2022 10:50:47.365 严重 [main] org.apache.catalina.startup.Catalina.stopServer 停止 Catalina 时出错
        java.net.ConnectException: Connection refused: connect
                at java.net.DualStackPlainSocketImpl.connect0(Native Method)
                at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
                at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476)
                at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218)
                at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200)
                at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162)
                at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394)
                at java.net.Socket.connect(Socket.java:606)
                at java.net.Socket.connect(Socket.java:555)
                at java.net.Socket.(Socket.java:451)
                at java.net.Socket.(Socket.java:228)
                at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:692)
                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:391)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:481)】

解决方法:去jdk安装目录下修改java.security文件(D:\jdk8_8u331\jre\lib\security\java.security)

将:securerandom.source=file:/dev/random

修改为:securerandom.source=file:/dev/./urandom

就不再提示报错了。

你可能感兴趣的:(tomcat,java)