zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Håkon Hallingstad <hakon.hallings...@gmail.com>
Subject Client stuck in connect loop
Date Thu, 16 Feb 2017 01:37:06 GMT
Reproducible with:

   1. Start zk server
   2. connect with ZooKeeper client
   3. Stop zk server, wipe db, start zk server

The client is now stuck in an infinite loop:

ClientCnxn:1032 - Opening socket connection to server localhost/ Will not attempt to authenticate using SASL (unknown error)
ClientCnxn:876 - Socket connection established to localhost/,
initiating session
ClientCnxn:1158 - Unable to read additional data from server sessionid
0x15a389b67c2000e, likely server has closed socket, closing socket
connection and attempting reconnect

It seems like the client tries to connect with the previous/old session id,
and the zk server just closes the connection, and tries again later.

If this is indeed what happens, it seems better to handle unknown session
IDs by letting the client know by, say emitting a special "unknown session"
event to Watcher so the user can take the appropriate action. Or, make the
ZooKeeper client treat unknown session ID response by emitting a session
expired event. Opinions?

Håkon Hallingstad

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message