Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [271] milliseconds
Posted jiml
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [271] milliseconds相关的知识,希望对你有一定的参考价值。
翻译过来是:使用[SHA1PRNG]创建用于会话ID生成的SecureRandom实例花费了[271]毫秒。
1/[SHA1PRNG] java的一个基于SHA-1算法实现且保密性较强的伪随机数生成器,详见java.security.SecureRandom()
找到两种解决办法/https://blog.csdn.net/u011627980/article/details/54024974:
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/urandom
替换成
securerandom.source=file:/dev/./urandom
但是都不奏效,后来发现本地环境jdk是1.8,jre是1.7
全部卸载后安装同一版本。最后work...
以上是关于Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [271] milliseconds的主要内容,如果未能解决你的问题,请参考以下文章
重启tomcat后,访问登陆接口响应慢--Creation of SecureRandom instance for session ID generation using [SHA1PRNG] to
Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [32,176] milliseco
tomcat启动慢,Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] ms
tomcat启动慢,Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] ms
tomcat启动慢,Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] ms(代
解决Linux Tomcat启动慢--Creation of SecureRandom instance for session ID generation using [SHA1PRNG] to(代