1.现象:tomcat启动项目时,耗费10几秒的时间

2.(tomcat7)解决:打开$JAVA_HOME/jre/lib/security/java.security这个文件

找到下面的内容:securerandom.source=file:/dev/urandom

替换成:       securerandom.source=file:/dev/./urandom

3.(tomcat7)解决:

修改catalina.sh .配置JRE使用非阻塞的Entropy Source
if [ -z "$JSSE_OPTS" ] ; then
  JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
fi
JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS -Djava.security.egd=file:/dev/./urandom"

 

相关文章:

  • 2021-11-23
  • 2021-12-20
  • 2022-02-08
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
猜你喜欢
  • 2022-01-02
  • 2021-04-15
  • 2021-12-04
  • 2021-10-03
  • 2022-03-09
  • 2021-12-19
  • 2021-12-19
相关资源
相似解决方案