Tomcat在Linux服务器启动卡住不动

文章目录

问题

Tomcat在Linux服务器启动卡住的情况,情况很简单,tomcat启动以后卡在
INFO: Deploying web application directory /usr/software/tomcat/apache-tomcat-7.0.61/webapps/docs
Tomcat在Linux服务器启动卡住不动
测试了下要10多分钟才能能启动
Tomcat在Linux服务器启动卡住不动

解决

将jdk下的
/usr/local/jdk8/jdk1.8.0_191/jre/lib/security/java.security
里面的

securerandom.source=file:/dev/random

改为:

securerandom.source=file:/dev/urandom

Tomcat在Linux服务器启动卡住不动

原因

linux或者部分unix系统提供随机数设备是/dev/random 和/dev/urandom ,两个有区别,urandom安全性没有random高,但random需要时间间隔生成随机数。jdk默认调用random。
Tomcat在Linux服务器启动卡住不动