Linux啟動tomcat後執行shutdown.sh關閉時出現異常:Connection refused (Connection refused)
安裝好jdk和apache後,第一次執行 ./startup.sh 成功的開啟了tomcat。 然後執行 ./shutdown.sh ,也正常關閉tomcat。
但是在第二次執行 ./startup.sh ,tomcat竟然沒有成功的開啟:
檢視程式的命令:
ps a
檢視了程式,java程式都正常開啟了,就是連結不上我們的tomcat:
== 然後我們嘗試關閉tomcat時,就報錯了!!==
這是我們的重點,解決這個關閉時的報錯。
目前我的jdk是1.8的;出現這個報錯,個人覺得是記憶體快取的原因
解決方法:進入jdk安裝的地方,修改java.security檔案
輸入以下命令,進入到這個檔案目錄下
cd /usr/softwareJDK/jdk1.8/jre/lib/security/
輸入 ll 檢視當前目錄的檔案
ll
修改java.security檔案
vim java.security
在檔案中找到securerandom.source這個設定項,將其改為:securerandom.source=file:/dev/./urandom
然後重啟一下伺服器,就可以連續的重啟tomcat啦,不會報錯啦。如果還不行,就等幾分鐘後就好了,或者殺死java的程式先。
相關文章
- java.net.ConnectException: Connection refused (Connection refused)JavaException
- java.net.ConnectException: Connection refused 異常JavaException
- java.sql.SQLException: Io 異常: Connection refusedJavaSQLException
- mysql connection refusedMySql
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- scp時候出現ssh Connection refused的解決方案
- IOException in sending Request :: Connection refusedException
- 異常解決——GitLab : ssh: connect to host port 22: Connection refusedGitlab
- Xlib: connection to ":0.0" refused by server(openSUSE)Server
- EJB create時ConnectException: Connection refused to host:....問題Exception
- FTP Connection refused error 解決辦法FTPError
- Xlib: connection to ":0.0" refused by server 問題Server
- go get報錯connect: connection refusedGo
- oracle listener錯誤Linux Error: 111: Connection refusedOracleLinuxError
- ssh連線Linux收到The remote system refused the connection報錯LinuxREM
- ssh: connect to host localhost port 22: Connection refusedlocalhost
- raw.githubusercontent.com port 443: Connection refusedGithub
- AS編譯不通過,提示Error:Connection refused: connect編譯Error
- Gradle 編譯不通過 connection refused connectGradle編譯
- Oracle11G監聽報錯Connection refusedOracle
- Solaris SSH 服務處於maintenance模式,ssh connection refusedAINaN模式
- Error!: SQLSTATE[HY000] [2002] Connection refusedErrorSQL
- kubernetes應用flannel失敗 Connection refused.
- jdbc連線sql server 出現 java.sql.SQLException: Network error IOException: Connection refused:JDBCSQLServerJavaExceptionError
- 怎樣實現關閉connection時自動關閉Statement和ResultSet
- 坑:ssh: connect to host github.com port 22: Connection refusedGithub
- 【轉載】Xlib: connection to ":0.0" refused by server的解決方法Server
- tomcat 啟動應用報錯:java.sql.SQLException: Io 異常: Connection resetTomcatJavaSQLException
- Xlib: connection to ":0.0" refused by server Xlib: No protocol specified解決方案ServerProtocol
- OGG 同步報錯 - TCP/IP error 111 (Connection refused)TCPError
- pa_simple_new() failed: Connection refused ubuntu 開啟root使用者的聲音AIUbuntu
- Listener refused the connection with the following error:ORA-12514, TNS:listenerError
- telnet localhost 44444 telnet: connect to address ::1: Connection refusedlocalhost
- Connection to https://dl-ssl.google.com refused的解決辦法HTTPGo
- OGG-01223 TCP/IP error 79 (Connection refused)TCPError
- ssh 安裝及登入提示:connection refused的解決辦法
- The connection to the server 10.10.0.2:6443 was refused - did you specify the right host or port?Server
- 解決 Android studio Connect to 127.0.0.1:[/127.0.0.1] failed: Connection refusedAndroid127.0.0.1AI