1. 程式人生 > >雲伺服器tomcat部署問題

雲伺服器tomcat部署問題

1.在啟動tomcat時出現這種錯誤,

07:50:06.372 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.

解決方法時:把專案從tomcat_home/webapps中移出來,放在其它位置。這樣做是為了避免 tomcat 載入專案兩次的坑,因為配置檔案中如果配置了該專案會被載入一次,而專案在 webapps 下面又會被自動重複載入一次,這個坑會引發一些莫名奇妙的問題。

2.tomcat啟動超級慢,十幾分鍾才能啟動。

12-Oct-2017 14:20:59.089 WARNING [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [850,730] milliseconds.
這個啟動時間非常恐怖,其實是tomcat阻塞在那裡了,具體原因是我大致瞭解到的是,linux根據噪聲來獲取隨機值,鍵盤聲等。

解決方法:jdk1.8.0_111/jre/lib/security/java.security。在你的jdk安裝目錄下找到這個檔案,替換下面的這句話,大約在第117行

重啟tomcat就好了,你會發現啟動超級快哦!!!