Center OS上启动Tomcat服务器,启动了没反应,关闭后报错问题
最近遇到一个问题,在使用虚拟机部署的时候,启动tomcat启动成功,但是访问不了,关闭的时候报错,但是端口确实是开启的。
经过查看,发现是8005端口启动不能在第一时间启动,导致tomcat无法快速运行。
解决方法
- 我们只需要打开文件:$JAVA_HOME/jre/lib/security/java.security
- 找到securerandom.source
- 将其拷贝一份注释做备份
- 将其修改为:securerandom.source=file:/dev/urandom
#将
securerandom.source=file:/dev/random
#修改为:
securerandom.source=file:/dev/urandom
#如果修改后还是不可以,则修改为:securerandom.source=file:/dev/./urandom