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

來源:互聯網
上載者:User

標籤:http   服務啟動   inux   start   client   apach   運行   cal   keep   

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  來關閉防火牆

 

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

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.