curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Grove (JIRA)" <>
Subject [jira] [Commented] (CURATOR-40) Curator client cannot connect after one zookeeper host shuts down on EC2
Date Mon, 22 Jul 2013 20:20:48 GMT


Andy Grove commented on CURATOR-40:

I think you are correct. Here is the stack trace: nodename nor servname provided,
or not known
	at Method)
	at org.apache.zookeeper.client.StaticHostProvider.<init>(
	at org.apache.zookeeper.ZooKeeper.<init>(

The workaround we have implemented, which isn't ideal, is to do DNS resolution on all host
names and then re-write the connection string using IP addresses before passing the connect
string to Curator. Obviously we exclude any hosts that we cannot resolve via DNS.

> Curator client cannot connect after one zookeeper host shuts down on EC2
> ------------------------------------------------------------------------
>                 Key: CURATOR-40
>                 URL:
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 2.0.1-incubating
>         Environment: Ubuntu instances on Amazon EC2 using DNS host names
>            Reporter: Andy Grove
>         Attachments:
> We use DNS names on Amazon EC2 to specify Zookeeper host names. If one of the ZK hosts
shuts down or loses network connectivity we can no longer connect via Curator, even though
the other ZK hosts are still running and have quorum. The issue is specific to an UnknownHostException
being thrown on DNS resolution when calling the start() method on CuratorZookeeperClient.
The workaround is for us to use IP addresses rather than DNS names, but this isn't really
workable on EC2 since IP addresses change when servers restart so we use Elastic IPs to ensure
that the ZK hosts have fixed IP addresses.
> I have attached a unit test which demonstrates the issue and provides more detail in
the comments.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message