有两种解决办法:

1)在Tomcat环境中解决

可以通过配置JRE使用非阻塞的Entropy Source。

在catalina.sh中加入这么一行:-Djava.security.egd=file:/dev/./urandom 即可。

加入后再启动Tomcat,整个启动耗时下降到Server startup in 2912 ms。

2)在JVM环境中解决

打开$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容:

securerandom.source=file:/dev/random

替换成

securerandom.source=file:/dev/urandom

相关文章:

  • 2021-09-15
  • 2021-12-06
  • 2022-12-23
  • 2021-11-28
  • 2021-09-06
  • 2021-06-21
  • 2021-08-21
  • 2021-08-03
猜你喜欢
  • 2021-11-13
  • 2021-09-18
  • 2021-11-08
  • 2022-02-17
  • 2021-12-08
  • 2021-11-07
相关资源
相似解决方案