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)的過(guò)程是煎熬的,足足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
總結(jié)
以上所述是小編給大家介紹的Linux服務(wù)器tomact 8.0啟動(dòng)慢的完美解決方法,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
Ubuntu 18.04上安裝 phpMyAdmin的詳細(xì)教程
這篇文章主要介紹了Ubuntu 18.04上安裝 phpMyAdmin的詳細(xì)教程,本文通過(guò)圖文并茂的形式給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-12-12linux中使用boost.python調(diào)用c++動(dòng)態(tài)庫(kù)的方法
這篇文章主要給大家介紹了關(guān)于linux中使用boost.python調(diào)用c++動(dòng)態(tài)庫(kù)的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起看看吧2018-11-11Ubuntu apt-get指令autoclean,clean,autoremove的區(qū)別
這篇文章主要介紹了Ubuntu apt-get指令autoclean,clean,autoremove的區(qū)別的相關(guān)資料,需要的朋友可以參考下2017-01-01Apache Shiro 使用手冊(cè)(二) Shiro 認(rèn)證
認(rèn)證就是驗(yàn)證用戶(hù)身份的過(guò)程。在認(rèn)證過(guò)程中,用戶(hù)需要提交實(shí)體信息(Principals)和憑據(jù)信息(Credentials)以檢驗(yàn)用戶(hù)是否合法。最常見(jiàn)的“實(shí)體/憑證”組合便是“用戶(hù)名/密碼”組合2014-06-06Linux 每天自動(dòng)備份mysql數(shù)據(jù)庫(kù)的方法
linux下為了安全有時(shí)候需要自動(dòng)備份mysql數(shù)據(jù)庫(kù),下面是具體的實(shí)現(xiàn)步驟。感興趣的朋友跟隨小編一起看看吧2009-09-09