首页 > 代码库 > centos7 中tomcat启动慢的问题

centos7 中tomcat启动慢的问题

1.问题定位

12-Jun-2017 15:04:12.221 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [134,646] milliseconds.

2.解决方法

vi {tomcat}/bin/setclasspath.sh 增加一条配置: JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"

3.验证

重启之后发现tomcat启动正常

centos7 中tomcat启动慢的问题