異常 java.net.ConnectException: Connection refused: no further information


java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
2018-03-20 16:29:50,781 [localhost-startStop-1-SendThread(192.168.220.129:2181)] [org.apache.zookeeper.ClientCnxnSocketNIO]-[DEBUG] Ignoring exception during shutdown input

在一開始啟動的時候會報這樣的錯誤

看到錯誤,有

第一個要看你的server是否真正的運行起來了,比如server在啟動過程某些組件加載異常,會導致服務啟動不成功。

第二個有可能是防火牆的原因,關閉防火牆試試

 

 我首先是關閉防火牆,再啟動服務

在linux下關閉防火牆可以使用命令

service iptables stop  來關閉防火牆

 

等我啟動服務,關閉防火牆之后 ,程序 就可以正常啟動了


免責聲明!

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



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