zookeeper报错java.net.ConnectException: Connection refused: no further information

时间:2024-03-15 12:13:05

具体异常信息:
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.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxnSendThread.run(ClientCnxn.java:1141)2018082314:29:30,700[localhoststartStop1SendThread(192.168.43.31:2181)][org.apache.zookeeper.ClientCnxnSocketNIO][DEBUG]Ignoringexceptionduringshutdowninputjava.nio.channels.ClosedChannelExceptionatsun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:780)atsun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:399)atorg.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)atorg.apache.zookeeper.ClientCnxnSendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxnSendThread.run(ClientCnxn.java:1170)2018082314:29:30,701[localhoststartStop1SendThread(192.168.43.31:2181)][org.apache.zookeeper.ClientCnxnSocketNIO][DEBUG]Ignoringexceptionduringshutdownoutputjava.nio.channels.ClosedChannelExceptionatsun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:797)atsun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:407)atorg.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)atorg.apache.zookeeper.ClientCnxnSendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
异常原因:
zookeeper未启动。
解决方法:
zookeeper报错java.net.ConnectException: Connection refused: no further information
再次启动tomcat,成功。