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

Switch to Threaded View
Zookeeper >> mail # dev >> wrong check causes continuous Exceptions in ZookeeperSaslClient (apparently)

Copy link to this message
wrong check causes continuous Exceptions in ZookeeperSaslClient (apparently)

I was running a few tests with Zookeeper (3.4.5) lately and found this
message continuously in my log files:
DEBUG [main-SendThread(localhost:55694):ZooKeeperSaslClient@519][] - Could
not retrieve login configuration: java.lang.SecurityException: Unable to
locate a login configuration.

I was actually just running one of the examples (LeaderSelectorExample) in
the Curator package.

When trying to find the origin or the problem, it seemed to me that the in
the previous lines of the corresponding method, there is an error. In line
487 it checks if the environment property exists, but there is an "||"
instead of an "&&" after it, so it does not skip the rest of the JAAS
configuration checking if the property is not there. Here is the code:

484         // variable or method in this class to determine whether the
client is
485         // configured to use SASL. (see also ZOOKEEPER-1455).
486         try {
487         if ((System.getProperty(Environment.JAAS_CONF_KEY) != null) ||
((javax.security.auth.login.Configuration.getConfiguration() != null) &&
490                        getAppConfigurationEntry(System.
492                            != null))) {
493                 // Client is configured to use a valid login
Configuration, so
494                 // authentication is either in progress, successful, or

Did I interpret this wrongly or is this something that should be fixed?