您好,登錄后才能下訂單哦!
小編給大家分享一下Linux服務(wù)器tomact 8.0啟動(dòng)慢怎么辦,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
環(huán)境信息:
CentOS release 6.8
tomcat-8.0
JDK1.8
一、啟動(dòng)tomcat
#sh /root/tomcat-8.0/bin/startup.sh #tailf /root/tomcat-8.0/logs/catalina.out
26-Aug-2017 12:58:31.661 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 26-Aug-2017 12:58:31.662 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 680 ms 26-Aug-2017 12:58:31.685 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina 26-Aug-2017 12:58:31.685 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32 26-Aug-2017 12:58:31.695 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /root/tomcat-8.0/webapps/ROOT 26-Aug-2017 12:58:36.184 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 26-Aug-2017 12:58:37.895 INFO [localhost-startStop-1] java.util.prefs.FileSystemPreferences$2.run Created system preferences directory in java.home. 26-Aug-2017 12:58:37.897 INFO [localhost-startStop-1] java.util.prefs.FileSystemPreferences$1.run Created user preferences directory. 26-Aug-2017 12:58:37.907 WARNING [localhost-startStop-1] java.util.prefs.FileSystemPreferences$6.run Prefs file removed in background /root/.java/.userPrefs/prefs.xml 26-Aug-2017 12:58:37.908 WARNING [localhost-startStop-1] java.util.prefs.FileSystemPreferences$6.run Prefs file removed in background /root/jdk-1.8/jre/.systemPrefs/prefs.xml
等待tomcat啟動(dòng)的過程是煎熬的,足足5/6分鐘,在不抱希望的情況下它居然又啟動(dòng)完成了......
有兩種解決辦法:
1)在Tomcat環(huán)境中解決
在catalina.sh中加入這么一行:
-Djava.security.egd=file:/dev/./urandom
例如:
JAVA_OPTS="-server -Xms2048m -Xmx4096m -XX:PermSize=256M -XX:MaxPermSize=512m -Djava.security.egd=file:/dev/./urandom"
2)在JVM環(huán)境中解決
修改$JAVA_PATH/jre/lib/security/java.security
securerandom.source=file:/dev/urandom
替換成
securerandom.source=file:/dev/./urandom
看完了這篇文章,相信你對“Linux服務(wù)器tomact 8.0啟動(dòng)慢怎么辦”有了一定的了解,如果想了解更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。