Are you guys passing one server to the ZooKeeper constructor or a list of servers? If possible, could you provide your part of the code in which you create a ZooKeeper object?


On Jan 5, 2009, at 10:46 AM, David Yee wrote:

I'm seeing this behavior as well, and I'm dealing with it by writing custom code to handle the logic of reconnecting to another zookeeper server.

it would be nice to get some clarity regarding whether this is expected behavior or if there is a bug in the client code.

We've also written code for dealing with other issues when losing a connection to a zk server. (implict triggering of all watches - since watches are stored locally on a particlar an server, etc)

On Jan 5, 2009, at 12:03 AM, "Kevin Burton" <> wrote:

I'm not observing this behavior... if I shutdown the zookeeper server my client doesn't reconnect and I get a disconnect event followed by eventual
session expiration.

Which is not the behavior I want :)

"Clients connect to a single ZooKeeper server. The client maintains a TCP connection through which it sends requests, gets responses, gets watch events, and sends heart beats. If the TCP connection to the server breaks,
the client will connect to a different server."

I don't see this documented anywhere.
I setup 5 zk servers.... if I connect to host1 and am performing some action like watching for file updates, and host1 fails, I *should* be able
to connect to hosts2-5 just fine.

But the ZooKeeper object doesn't do this for me....

What's the correct behavior here?


Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator

Reply via email to