[
https://issues.apache.org/jira/browse/ZOOKEEPER-1543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447344#comment-13447344
]
Ben Bangert commented on ZOOKEEPER-1543:
----------------------------------------
It's about making it easier to debug. Let's say you saved the password and
session ID, and resumed it within the appropriate period.... but the session
password got corrupted somehow. Zookeeper doesn't say you have the wrong
session id + password, it says the session is expired. That's plain wrong, and
indicating that is confusing when trouble-shooting *why* the password got
corrupted because Zookeeper just told you the wrong thing.
If you have a bad password for the session ID, there is no sane reason to say
"SESSION_EXPIRED", *unless the session is actually expired*. All it does is
make it harder to trouble-shoot the real problem if there's password corruption
occurring between client restarts on the client-side. Systems should be easy to
trouble-shoot, having Zookeeper throw someone down the wrong path because its
providing misleading information isn't good.
> Bad sessionId/password combo should return auth failure
> -------------------------------------------------------
>
> Key: ZOOKEEPER-1543
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1543
> Project: ZooKeeper
> Issue Type: Improvement
> Components: server
> Affects Versions: 3.4.3, 3.3.6, 3.5.0
> Environment: All
> Reporter: Ben Bangert
>
> When connecting to a server with a valid session id, but invalid password,
> Zookeeper disconnects with a SESSION_EXPIRED error. This is blatantly false,
> its actually the wrong password. Returning a SESSION_EXPIRED in this case is
> also not documented anywhere.
> This makes debugging this issue an absolute nightmare, since the server has
> already lead you down the wrong track (trying to figure out why the session
> is expired, but it isn't).
> There's already an AUTH_FAILURE error, why not return that?
--
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: http://www.atlassian.com/software/jira