dubbo注册中心zookeeper出现异常 Opening socket connection to server 10.70.42.99/10.70.42.99:2181. Will not at
Posted 我的Java故居
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了dubbo注册中心zookeeper出现异常 Opening socket connection to server 10.70.42.99/10.70.42.99:2181. Will not at相关的知识,希望对你有一定的参考价值。
linux下,zookeeper安装并启动起来了,
将log4j.properties放在工程的classpath下,然后启动工程,发现控制台报错:
2017-03-02 19:52:32,270 INFO [org.apache.zookeeper.ZooKeeper] - Initiating client connection, connectString=192.168.153.128:2181 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@1d6ba2b
2017-03-02 19:52:32,288 INFO [org.apache.zookeeper.ClientCnxn] - Opening socket connection to server 192.168.153.128/192.168.153.128:2181. Will not attempt to authenticate using SASL (unknown error)
2017-03-02 19:52:53,291 WARN [org.apache.zookeeper.ClientCnxn] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-03-02 19:52:54,394 INFO [org.apache.zookeeper.ClientCnxn] - Opening socket connection to server 192.168.153.128/192.168.153.128:2181. Will not attempt to authenticate using SASL (unknown error)
经检查,是linux下防火墙未关闭,使用一下命令关闭防火墙:
service iptables stop
查看防火墙状态:
service iptables status
参考资料:https://www.cnblogs.com/hfultrastrong/p/7876198.html
以上是关于dubbo注册中心zookeeper出现异常 Opening socket connection to server 10.70.42.99/10.70.42.99:2181. Will not at的主要内容,如果未能解决你的问题,请参考以下文章
Spring Boot 连接 ZooKeeper 注册中心发生异常的排查经历