【平坑攻略】SpringCloud集成zookeeper:java.net.ConnectException: Connection refused: no further information

    科技2022-07-11  94

    一、报错信息

    java.net.ConnectException: Connection refused: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_60] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_60] at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357) ~[zookeeper-3.5.3-beta.jar:3.5.3-beta-8ce24f9e675cbefffb8f21a47e06b42864475a60] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214) ~[zookeeper-3.5.3-beta.jar:3.5.3-beta-8ce24f9e675cbefffb8f21a47e06b42864475a60]

    从报错信息看,是没有远程的服务器信息,但是把网上的原因试了一遍,怎么都不行

    二、解决办法 连接zookeeper的key:value值是 spring.cloud.zookeeper.connect-string: 192.168.184.128:2180

    商俊帅 认证博客专家 Java csdn博客专家 代码路上的小学生,主要涉及有Java、Spring、分布式、微服务等,热爱技术,乐于分享,一起成长,遇见未知的自己
    Processed: 0.009, SQL: 8