Tomcat在Linux服务器启动卡住不动
问题
Tomcat在Linux服务器启动卡住的情况,情况很简单,tomcat启动以后卡在
INFO: Deploying web application directory /usr/software/tomcat/apache-tomcat-7.0.61/webapps/docs
测试了下要10多分钟才能能启动
解决
将jdk下的
/usr/local/jdk8/jdk1.8.0_191/jre/lib/security/java.security
里面的
securerandom.source=file:/dev/random
改为:
securerandom.source=file:/dev/urandom
原因
linux或者部分unix系统提供随机数设备是/dev/random 和/dev/urandom ,两个有区别,urandom安全性没有random高,但random需要时间间隔生成随机数。jdk默认调用random。