具体异常信息:
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)2018−08−2314:29:30,700[localhost−startStop−1−SendThread(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)2018−08−2314:29:30,701[localhost−startStop−1−SendThread(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未启动。
解决方法:
再次启动tomcat,成功。