| java.net.ConnectException: Connection refused: no further informationat 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  来关闭防火墙   等我启动服务,关闭防火墙之后 ,程序 就可以正常启动了 |