tomcat启动太慢,耗时很长的问题 Creation of SecureRandom instance for ...

tomcat启动很长时间,tomcat输出日志:

INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [142,478] milliseconds.


最终解决问题的办法,修改java参数,得到解决:

vim $JAVA_HOME/jre/lib/security/java.security 

修改内容:

#securerandom.source=file:/dev/random     #修改前

securerandom.source=file:/dev/./urandom   #修改后,注意"u"


你可能感兴趣的:(常见问题,开发,Linux)