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的程式先。
相關文章
- nacos Connection refused (Connection refused)
- java.net.ConnectException: Connection refused (Connection refused)JavaException
- java.net.ConnectException: Connection refused 異常JavaException
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- SSH出現Connection refused錯誤
- 異常解決——GitLab : ssh: connect to host port 22: Connection refusedGitlab
- go get報錯connect: connection refusedGo
- nameko shell 報錯 : [Errno 111] Connection refused
- raw.githubusercontent.com port 443: Connection refusedGithub
- Error!: SQLSTATE[HY000] [2002] Connection refusedErrorSQL
- ssh: connect to host localhost port 22: Connection refusedlocalhost
- kubernetes應用flannel失敗 Connection refused.
- telnet localhost 44444 telnet: connect to address ::1: Connection refusedlocalhost
- 解決 Android studio Connect to 127.0.0.1:[/127.0.0.1] failed: Connection refusedAndroid127.0.0.1AI
- Listener refused the connection with the following error:ORA-12514, TNS:listenerError
- OGG-01224 error 111:Connection refused - retries exceeded.Error
- 坑:ssh: connect to host github.com port 22: Connection refusedGithub
- Solaris SSH 服務處於maintenance模式,ssh connection refusedAINaN模式
- The connection to the server 10.10.0.2:6443 was refused - did you specify the right host or port?Server
- Jedis 連線 Redis報JedisConnectionException: java.net.ConnectException: Connection refusedRedisExceptionJava
- (20200916 Solved)Docker||redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refusedDockerRedis127.0.0.1
- 連線資料庫提示sqlstate[hy000] [2002] Connection refused資料庫SQL
- pa_simple_new() failed: Connection refused ubuntu 開啟root使用者的聲音AIUbuntu
- idea報錯資料庫connection refused【杭州多測師_樹哥】Idea資料庫
- 解決telnet: connect to address 127.0.0.1: Connection refused的錯誤資訊問題127.0.0.1
- CM agent 傳送heartbeat給CM server 不斷髮生 connection refused:timed outServer
- 使用putty遠端登入Ubuntu時,報Network error:Connection refused錯誤及解決(記錄)UbuntuError
- wsl docker 安裝frp內網穿透出現error: dial tcp 127.0.0.1:xxxx: connect: connection refused解決方法DockerFRP內網穿透ErrorTCP127.0.0.1
- ubuntu ssh: connect to host ** port 22: Connection refused ssh登入遠端伺服器時提示Permission denied (publickey,password)Ubuntu伺服器
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- 解決Mac終端下載報錯 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refusedMacAIGithub
- 設定定時器——Tomcat啟動後開始執行定時器Tomcat
- HttpClient遭遇Connection Reset異常,如何正確配置?HTTPclient
- docker phpmyadmin 連線宿主mysql資料庫報錯:mysqli::real_connect(): (HY000/2002): Connection refusedDockerPHPMySql資料庫
- Java中處理SocketException: Connection reset”異常的方法JavaException
- 9. 啟動、關閉tomcatTomcat
- 關於Residual Connection
- 關閉EBS後重新開啟出現concurrent manager異常及cmclean.sql慢問題[final]SQL