本文主要是介绍Tomcat| Tomcat启动卡住(Deploying web application directory ...),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
出错环境
JDK环境:
java version “1.8.0_161”
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
系统环境:
Linux yveshe 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Tomcat环境:
Server version: Apache Tomcat/8.5.32
Server built: Jun 20 2018 19:50:35 UTC
Server number: 8.5.32.0
OS Name: Linux
OS Version: 3.10.0-693.17.1.el7.x86_64
Architecture: amd64
JVM Version: 1.8.0_161-b12
JVM Vendor: Oracle Corporation
原因
# property "java.security.egd". For example:
#
# % java -Djava.security.egd=file:/dev/random MainClass
#
# Specifying this System property will override the
# "securerandom.source" Security property.
#
# In addition, if "file:/dev/random" or "file:/dev/urandom" is
# specified, the "NativePRNG" implementation will be more preferred than
# SHA1PRNG in the Sun provider.
#
说明我们可以通过制定系统属性java.security.egd
来覆盖系统默认的属性’securerandom.source’的值.
另外我们可以通过修改<JDKInstallDir>/jre/lib/security/java.security
中对securerandom.source
的设置对所有使用该JVM的应用程序生效.
file:/dev/random
为当你的系统会出现伪随机数时候提供等待
file:/dev/urandom
为当你的系统会出现伪随机数时候不等待
解决办法
修改Tomcat使用的的JDK中<JDKInstallDir>/jre/lib/security/java.security
文件:
securerandom.source=file:/dev/random
为securerandom.source=file:/dev/urandom
这篇关于Tomcat| Tomcat启动卡住(Deploying web application directory ...)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!