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

转载于:https://www.cnblogs.com/yft-javaNotes/p/10132528.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值