zookeeper连接unexpected error, closing socket connection and attempting reconnect错误分解决
2018-08-29 09:47:47,507 INFO [ZooKeeper.java:438] : Initiating client connection, connectString=47.105.67.156:2181 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@1b6e5a352018-08-29 09:47..
2018-08-29 09:47:47,507 INFO [ZooKeeper.java:438] : Initiating client connection, connectString=47.105.67.156:2181 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@1b6e5a35
2018-08-29 09:47:47,582 INFO [ClientCnxn.java:966] : Opening socket connection to server ubuntu16/47.105.67.156:12181. Will not attempt to authenticate using SASL (unknown error)
2018-08-29 09:48:08,602 WARN [ClientCnxn.java:1089] : 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(Unknown Source)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
2018-08-29 09:48:09,730 INFO [ClientCnxn.java:966] : Opening socket connection to server ubuntu16/47.105.67.156:2181. Will not attempt to authenticate using SASL (unknown error)
2018-08-29 09:48:30,736 WARN [ClientCnxn.java:1089] : 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(Unknown Source)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
2018-08-29 09:48:31,836 INFO [ClientCnxn.java:966] : Opening socket connection to server ubuntu16/47.105.67.156:2181. Will not attempt to authenticate using SASL (unknown error)
本地服务连接阿里云上的zookeeper,总是报如上错误,显示连接超时。关闭防火墙后,问题仍然没有解决!
本地 telnet ip 2181 发现端口不通。就怀疑是阿里云服务器的问题,根据:https://www.cnblogs.com/klmei/p/7055571.html
重新开放了相应的端口,问题得以解决!
总结:阿里云服务器,有两处控制端口。1.服务器端防火墙 2.控制台安全组。开发过程中应该注意。
更多推荐
所有评论(0)