Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper, mail # user - Question regarding behaviour of Zookeeper Quorum in case of network connectivity loss

Copy link to this message
Question regarding behaviour of Zookeeper Quorum in case of network connectivity loss
yuliya Feldman 2012-11-19, 08:06
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.