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

启动tomcat很慢,检查后发现:
[localhost-startStop-1]
org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [131,830] milliseconds。

主要时间都花在Creation of SecureRandom instance上了

解决办法:

先检查$JAVA_HOME/jre/lib/security/java.security中用的file:/dev/./random!是否前面少了个u!!如果是,改成file:/dev/urandom后,重启tomcat,sucess。

posted @ 2018-11-20 11:51  应知不染心  阅读(213)  评论(0编辑  收藏  举报