-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zookeeper client session is not reset when cluster loses session state (authentication failed: EOF) #36
Comments
Is this similer to what we see in #17? |
Hi there, |
I tried to investigate this issue more but the problem here is that I don't know how to differentiate between an |
Interesting. It's odd that the zookeeper server just end the connection if the session could not be found vs a more specific error (or perhaps we aren't parsing the error?) Has anyone dug through the java client code to see if there is some special handling there? |
I created a patch to workaround this. It's based on a different fork, but it should be compatible. TL;DR; The client keeps track of how long ago was the last successful authentication, and if we see an auth request fail with Shall I open a PR? |
This is the commit on the fork jpfourny@cd8998a |
@jpfourny Your patch looks pretty similar to the PR I submitted above with this issue originally. Looking through it I think the only major difference between them is your call to |
That works. I do recommend you move I vote for getting this merged. If we lost quorum for longer than session timeout, then our session would have expired anyway. I feel it's safe for the client to abandon their session at this point, no matter what the state of the quorum actually is. |
Hi, Is there still ongoing work on this issue |
Signed-off-by: zwtop <[email protected]>
Signed-off-by: zwtop <[email protected]>
How can I recreate this scenario with a Zookeeper cluster (single- or 3-node) and a client that uses go-zookeeper? Any suggestions @jpfourny @colinmcintosh ? |
Hi, I noticed an issue where the go-zookeeper client will not reset the session if the Zookeeper cluster loses it's session state (instance reset, redeploy, etc) and the server responds with an EOF. When this happens the client enters an endless loop trying to authenticate with the previous Session ID. It looks like the loop happens here:
zk/conn.go
Line 435 in 50daf81
I haven't had a chance to look through the code yet for this but I'm wondering if anyone knows what process needs to happen to reset the session in the client?
The text was updated successfully, but these errors were encountered: