阿里云tomcat启动慢的问题怎么解决

    xiaoxiao2021-03-25  143

    今天在服务器上部署网站时 启动tomcat无错 tail -f catalina.out日志 和 catalina.sh run 方式启动时 卡在22-Jul-2016 23:00:53.921 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/dev/apache-tomcat-8.0.36/webapps/manager 这里

    后来在一篇博客上找到解决办法

    将$JAVA_HOME/jre/lib/security/Java.security内,将securerandom.source的内容改为file:/dev/./urandom即可

    Linux或者部分unix系统提供随机数设备是/dev/random 和/dev/urandom ,两个有区别,urandom安全性没有random高,但random需要时间间隔生成随机数。

    可能在生成随机数的时候卡住了,导致tomcat启动不了

    在服务器启动时也可以加上参数 -Djava.security.egd=file:/dev/./urandom 

    转载请注明原文地址: https://ju.6miu.com/read-2709.html

    最新回复(0)