本文主要是介绍tomcat 8005端口未启动,故无法关闭tomcat,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
8005端口未启动,无法关闭tomcattomcat启动的时候看不出异常,关闭的时候回报错类似:
Jul 17, 2015 9:47:54 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact localhost:8005. Tomcat may not be running.
Jul 17, 2015 9:47:54 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
Java.NET.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.Net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.(Socket.java:372)
at java.net.Socket.(Socket.java:186)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:498)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:370)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:457)
即为8005端口未运行,使用命令netstat -ant 发现 没有找到8005端口
解决办法:
修改$JAVA_HOME/jre/lib/security/Java.security 文件中 securerandom.source 配置项:
cd $JAVA_HOME/jre/lib/security/
将
securerandom.source=file:/dev/ random
修改为:
securerandom.source=file:/dev/ urandom
这篇关于tomcat 8005端口未启动,故无法关闭tomcat的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!