Tomcat启动时Creation of SecureRandom instance for session ID很慢

阅读更多

Tomcat启动时Creation of SecureRandom instance for session ID很慢

解决方案有两种:

1、修改java.security文件

     文件位置:$JAVA_HOME/jre/lib/security/java.security

     打开并找到以下内容:

         securerandom.source=file:/dev/random

     修改为:

         securerandom.source=file:/dev/urandom

 

2、添加参数java.security.egd=file:/dev/./urandom

     在启动Tomcat时添加启动参数-Djava.security.egd=file:/dev/urandom

     可在catalina.sh文件中添加

 

第一种已测试,第二种修改未做测试

你可能感兴趣的:(Tomcat启动时Creation of SecureRandom instance for session ID很慢)