报错信息:

2018-05-11 15:10:59,097 [main-SendThread()] INFO  [org.apache.zookeeper.ClientCnxn] - Opening socket connection to server zkserver/127.0.0.1:2181
2018-05-11 15:11:00,125 [main-SendThread(zkserver:2181)] WARN  [org.apache.zookeeper.ClientCnxn] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)

at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)


注意节点Opening ...  在启动xxx 服务,服务为null,项目启动报错,大部分原因是该服务没有正常启动,如上则是zookeeper 没有正常启动

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐