[
https://issues.apache.org/jira/browse/ZOOKEEPER-1437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278983#comment-13278983
]
Antonio commented on ZOOKEEPER-1437:
------------------------------------
Hi All,
In a scenario where the zookeeper server gets killed and restarted while a java
zookeeper client is connected I get the following in the log: (Please note the
Error at bottom)
{code:none}
[main-SendThread(localhost:60728)] DEBUG
org.apache.zookeeper.client.ZooKeeperSaslClient -
ClientCnxn:sendSaslPacket:length=0
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:60728] DEBUG
org.apache.zookeeper.server.ZooKeeperServer - Responding to client SASL token.
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:60728] DEBUG
org.apache.zookeeper.server.ZooKeeperServer - Size of client SASL token: 0
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:60728] DEBUG
org.apache.zookeeper.server.ZooKeeperServer - Size of server SASL response: 101
[main-SendThread(localhost:60728)] DEBUG org.apache.zookeeper.ClientCnxn -
Reading reply sessionid:0x1376082ca4f0000, packet:: clientPath:null
serverPath:null finished:false header:: 9,102 replyHeader:: 9,0,0 request::
response::
#7265616c6d3d227a6b2d7361736c2d6d6435222c6e6f6e63653d22717a485932306a56743534552f483668315837734e2b4b56656e4c335772666458716f6468336247222c636861727365743d7574662d382c616c676f726974686d3d6d64352d73657373
2012-05-18 15:14:16,908 [SyncThread:0] DEBUG
org.apache.zookeeper.server.FinalRequestProcessor - Processing request::
sessionid:0x1376082ca4f0000 type:ping cxid:0xfffffffffffffffe
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
2012-05-18 15:14:16,908 [SyncThread:0] DEBUG
org.apache.zookeeper.server.FinalRequestProcessor -
sessionid:0x1376082ca4f0000 type:ping cxid:0xfffffffffffffffe
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
[main-EventThread] DEBUG org.apache.zookeeper.client.ZooKeeperSaslClient -
ServerSaslResponseCallback(): using empty data[] as server response (length=0)
[main-EventThread] DEBUG org.apache.zookeeper.client.ZooKeeperSaslClient -
saslToken (server) length: 0
[main-EventThread] DEBUG org.apache.zookeeper.client.ZooKeeperSaslClient -
saslClient.evaluateChallenge(len=0)
[main-EventThread] ERROR org.apache.zookeeper.client.ZooKeeperSaslClient - An
error: (java.security.PrivilegedActionException:
javax.security.sasl.SaslException: DIGEST-MD5: Digest-challenge format
violation: algorithm directive missing) occurred when evaluating Zookeeper
Quorum Member's received SASL token. Zookeeper Client will go to AUTH_FAILED
state.
[main-EventThread] ERROR org.apache.zookeeper.client.ZooKeeperSaslClient -
SASL authentication failed using login context 'null'.
{code}
I was wondering why the "empty data[]" is expected since it always drives in my
case to a SASL authentication failed.
I know this is not the correct set up but at moment only one Zk server is set
up. Not sure if this is actually causing the issue.
*Just for test* I've applied the last patch provided on this ticket with date
16/May/12 18:17
and then in ClientCnxn.java:565 I've added a null check for rsp.getToken()..
and I'm not getting that issue anymore.
{code:none}
Index: src\java\main\org\apache\zookeeper\ClientCnxn.java
===================================================================
--- src\java\main\org\apache\zookeeper\ClientCnxn.java (revision 95556)
+++ src\java\main\org\apache\zookeeper\ClientCnxn.java (working copy)
@@ -563,6 +563,7 @@
ZooKeeperSaslClient.ServerSaslResponseCallback cb =
(ZooKeeperSaslClient.ServerSaslResponseCallback) p.cb;
SetSASLResponse rsp = (SetSASLResponse) p.response;
// TODO : check rc (== 0, etc) as with other packet
types.
+ if (null != rsp.getToken()){
cb.processResult(rc,null,p.ctx,rsp.getToken(),null);
ClientCnxn clientCnxn = (ClientCnxn)p.ctx;
if ((clientCnxn == null) ||
(clientCnxn.zooKeeperSaslClient == null) ||
@@ -571,6 +572,7 @@
queueEvent(new WatchedEvent(EventType.None,
KeeperState.AuthFailed, null));
}
+ }
} else if (p.response instanceof GetDataResponse) {
DataCallback cb = (DataCallback) p.cb;
GetDataResponse rsp = (GetDataResponse) p.response;
{code}
> Client uses session before SASL authentication complete
> -------------------------------------------------------
>
> Key: ZOOKEEPER-1437
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1437
> Project: ZooKeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.4.3
> Reporter: Thomas Weise
> Assignee: Eugene Koontz
> Fix For: 3.4.4, 3.5.0
>
> Attachments: ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch,
> ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch,
> ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch,
> ZOOKEEPER-1437.patch
>
>
> Found issue in the context of hbase region server startup, but can be
> reproduced w/ zkCli alone.
> getData may occur prior to SaslAuthenticated and fail with NoAuth. This is
> not expected behavior when the client is configured to use SASL.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira