You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by yuliya Feldman <yu...@yahoo.com> on 2012/11/19 09:06:26 UTC

Question regarding behaviour of Zookeeper Quorum in case of network connectivity loss

Hello here,

We have a situation when one of the Zookeeper servers (Linux server) is unplugged from network for some time - which causes leader reelection, Zookeeper sessions 

expiration and all usual stuff.

What I am more interested in is that when application (ZK client) tries to reconnect - new Zookeeper(...) it gets following exception:
java.net.UnknownHostException: <hostname here>
  at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
  at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
  at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
  at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
  at java.net.InetAddress.getAllByName(InetAddress.java:1083)
  at java.net.InetAddress.getAllByName(InetAddress.java:1019)
  at org.apache.zookeeper.ClientCnxn.<init>(ClientCnxn.java:386)
  at org.apache.zookeeper.ClientCnxn.<init>(ClientCnxn.java:331)
  at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:377)


where <hostname here> - is the hostname of the server that was unplugged from the network.

What client application suppose to do in this case? 

Rest of ZK servers do not complain among themselves that one that is defined in zoo.cfg is "UnknownHost"
They do leader election and Quorum is reestablished, but ZK Client does not get created because of the exception above.

Any advice would be appreciated.

Thanks.