Bug修改日记:连接被拒绝: ConnectException
Posted 努力的clz
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Bug修改日记:连接被拒绝: ConnectException相关的知识,希望对你有一定的参考价值。
报错信息
java.net.ConnectException: Connection refused: no further information
连接异常:连接被拒绝:无进一步信息
java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[na:na]
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946) ~[na:na]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
2023-02-13 15:58:29.126 INFO 15048 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2023-02-13 15:58:29.127 WARN 15048 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Session 0x0 for server 127.0.0.1/127.0.0.1:2181, unexpected error, closing socket connection and attempting reconnect
原因
未启动 zookeeper服务
导致项目报错
以上是关于Bug修改日记:连接被拒绝: ConnectException的主要内容,如果未能解决你的问题,请参考以下文章
Redis踩坑日记Redis由于目标计算机积极拒绝,无法连接