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 來關閉防火牆
等我啟動服務,關閉防火牆之后 ,程序 就可以正常啟動了
