0%

tomcat启动卡在org.apache.catalina.startup.HostConfig.deployDirectory

在catalina.sh中加入这么一行:-Djava.security.egd=file:/dev/./urandom
或者
将$JAVA_HOME/jre/lib/security/java.security内的securerandom.source参数修改为file:/dev/./urandom
将securerandom.source参数修改为file:/dev/./urandom后,tomcat的问题解决。

或者在 /etc/systemd/system/tomcat.service JAVA_OPTS中添加

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target

[Service]
Type=forking

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

User=tomcat
Group=tomcat

[Install]
WantedBy=multi-user.target

作者:qq_38293564
来源:CSDN
原文:https://blog.csdn.net/qq_38293564/article/details/80395389
版权声明:本文为博主原创文章,转载请附上博文链接!