IO Error: Connection reset by peer, Authentication lapse 137099 ms.


搭建TOMCAT 服務遇到了這個錯, IO Error: Connection reset by peer, Authentication lapse 137099 ms.

 

錯誤很奇怪,環境搭建好后第一次可以正常啟動,只要重啟了tomcat就會出現這個錯誤,連續試了幾個服務都是這樣,,

但是通過錯誤信息來看,應該是應用在連接數據庫授權的時候超時了。。

網上搜了一番,得到一下結論,親試可以解決,推薦給大家:

 

Avoiding JVM Delays Caused by Random Number Generation
The library used for random number generation in Sun’s JVM relies on /dev/random by default for UNIX platforms. This can potentially block the WebLogic SIP Server process because on some operating systems /dev/random waits for a certain amount of “noise” to be generated on the host machine before returning a result. Although /dev/random is more secure, BEA recommends using /dev/urandom if the default JVM configuration delays WebLogic SIP Server startup.
To determine if your operating system exhibits this behavior, try displaying a portion of the file from a shell prompt:
head -n 1 /dev/random
If the command returns immediately, you can use /dev/random as the default generator for SUN’s JVM. If the command does not return immediately, use these steps to configure the JVM to use /dev/urandom:
Open the $JAVA_HOME/jre/lib/security/java.security file in a text editor.
Change the line:
securerandom.source=file:/dev/random
to read:
securerandom.source=file:/dev/urandom
Save your change and exit the text editor.

  

網上作者的解釋

避免因隨機數生成而導致的JVM延遲
在UNIX平台上,Sun的JVM中用於隨機數生成的庫默認依賴於/ dev / random。可能會阻止WebLogic SIP Server進程,因為在某些操作系統上/ dev / random會在返回結果之前等待主機上產生一定量的“干擾”。盡管/ dev / random更安全,但如果默認JVM配置延遲WebLogic SIP Server啟動,BEA建議使用/ dev / urandom。
要確定你的操作系統是否出現此行為,請嘗試在shell提示符下顯示該文件的一部分:
head -n 1 / dev / random如果命令立即返回,則可以使用/ dev / random作為SUN JVM的默認生成器。如果命令未立即返回,請使用以下步驟將JVM配置為使用/ dev / urandom:
在文本編輯器中打開$ JAVA_HOME / jre / lib / security / java.security文件。
更改這一行配置:securerandom.source = file:/ dev / random
改為這個:securerandom.source = file:/ dev / urandom
保存更改並退出文本編輯器。

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM