Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper, mail # user - Disabling SASL


+
Michael Morello 2012-11-26, 12:05
Copy link to this message
-
Re: Disabling SASL
Michael Morello 2012-11-27, 08:30
OK, I have found where my problem come from :

Configuration.getAppConfigurationEntry used in ZookeeperSASLClient (lines
97 and 490) throws unchecked exception (see
http://docs.oracle.com/javase/6/docs/api/javax/security/auth/login/Configuration.html#getAppConfigurationEntry(java.lang.String)
)
ZookeeperSASLClient tries to catch SecurityException only, but if the
implementation of getAppConfigurationEntry throws any other kind of
unchecked exception then it fails and the client never connect.
This is what happens in my case : Weblogic BEA engineers chose
java.lang.IllegalArgumentException

Since no assumption can be made on the type of exception thrown by
getAppConfigurationEntry any RuntimeException should be catch : this is
what i tried and it works : https://gist.github.com/4153107

Please devs i would like to have your opinion on it.
Do you mind if open a JIRA with this patch ?

Thank you

(following up to  ZooKeeper developer mailing list)

2012/11/26 Michael Morello <[EMAIL PROTECTED]>

> Hi all,
>
> While trying to embed Zookeeper client in a Weblogic application server
> following exception is raised :
>
> 26 nov. 2012 12:17:29,250 WARN  : Session 0x0 for server null, unexpected
> error, closing socket connection and attempting reconnect
> java.lang.IllegalArgumentException: No Configuration was registered that
> can handle the configuration named Client
> at
> com.bea.common.security.jdkutils.JAASConfiguration.getAppConfigurationEntry(JAASConfiguration.java:124)
>  at
> org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:97)
> at
> org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943)
>  at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993)
> [ .... repeat .....]
> 26 nov. 2012 12:17:44,469 ERROR : Connection timed out for connection
> string (55.37.68.64:2181,55.10.122.25:2181,55.10.122.172:2181) and
> timeout (15000) / elapsed (16312)
> org.apache.zookeeper.KeeperException$ConnectionLossException:
> KeeperErrorCode = ConnectionLoss
> at
> com.netflix.curator.ConnectionState.getZooKeeper(ConnectionState.java:94)
>  at
> com.netflix.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:107)
> at
> com.netflix.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:413
>
>