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/randomsecurerandom.source=file:/dev/urandom

猜你喜欢

转载自blog.csdn.net/u011479200/article/details/81067485
今日推荐