Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [184,726] millisec
来源:互联网 发布:js格式化日期时间 编辑:程序博客网 时间:2024/04/28 18:02
正常的启动tomcat8而且并没有报错,等待了很久终于看到日志打印出来启动成功了
请看下面
Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [184,726] milliseconds.
Tomcat 7/8都使用org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom类产生安全随机类SecureRandom的实例作为会话ID,这里花去了455秒。就是这里花了大量的时间去。
有两种解决办法:
1.在Tomcat环境中解决
可以通过配置JRE使用非阻塞的Entropy Source。
在catalina.sh中加入这么一行:-Djava.security.egd=file:/dev/./urandom 即可。
加入后再启动Tomcat,整个启动耗时下降到Server startup in 6213 ms,大大降低了启动的时间。
2.在JVM环境中解决
先执行which javac命令检查jdk安装路径
/usr/local/java/jdk1.8.0_92/bin/javac
去到$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容:
securerandom.source=file:/dev/urandom
替换成
securerandom.source=file:/dev/./urandom
这样问题就解决了
本文出处:原文出处
阅读全文
0 0
- Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [184,726] millisec
- Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] milliseconds
- tomcat启动慢, Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] mil
- tomcat 启动慢 Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] mil
- tomcat启动慢, Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] mil
- tomcat 启动慢 Creation of SecureRandom instance for session ID generation using [SHA1PRNG]
- Tomcat启动 Creation of SecureRandom instance for session ID
- Tomcat启动时Creation of SecureRandom instance for session ID很慢
- Tomcat启动缓慢 Creation of SecureRandom instance for ... 花费时间过长的解决方法
- tomcat启动太慢,耗时很长的问题 Creation of SecureRandom instance for ...
- secureRandom 实现 之 SHA1PRNG
- The operation order of instance creation
- Using Class of Secure Transport (COST) to Restrict Instance Registration in Oracle RAC (Doc ID 13408
- ArcGIS for Server:Error: Server Object instance creation failed
- oratop - Utility for Near Real-time Monitoring of Databases, RAC and Single Instance (Doc ID 1500864
- [C/C++] An instance of using EPoll
- How to Enable SQL_TRACE for Another Session or in MTS Using Oradebug(文档 ID 1058210.6)
- 10g Manual Database Creation in Oracle (Single Instance and RAC) (文档 ID 240052.1)
- 如何制作一个vagrant的base box
- JavaScript中8个常见的陷阱
- CSK跟踪算法简介及代码的解读
- 开发注意事项-1
- Linux串口驱动程序(5)-串口接收分析
- Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [184,726] millisec
- POJ2887
- 内网与外网之间是如何通信的
- FX3/CX3 jtag debug
- vs code安装后的一些设置
- stm32IAP代码升级小结
- 重构——简化条件表达式9.5
- Android 中的 Binder 机制
- Lagom参考指南(五)