[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Todd Lipcon updated ZOOKEEPER-1510:
-----------------------------------

    Attachment: zookeeper-1510.txt

Attached patch changes the SASL-related message to piggy-back on the 
"Connecting" message except for the true error case. I tested by running the 
existing unit tests and looking at the logs. Examples:

*Successfully found config:*
{code}
Opening socket connection to server todd-w510/127.0.0.1:11221. Will attempt to 
SASL-authenticate using Login Context section 'MyZookeeperClient'
{code}

*Failed configuration:*
{code}
2012-07-16 13:00:50,723 [myid:] - WARN  
[main-SendThread(todd-w510:11221):ClientCnxn$SendThread@942] - SASL 
configuration failed: javax.security.auth.login.LoginException: Client cannot 
SASL-authenticate because the specified JAAS configuration section 
'MyZookeeperClient' could not be found. Will continue connection to Zookeeper 
server without SASL authentication, if Zookeeper server allows it.
2012-07-16 13:00:50,726 [myid:] - INFO  
[main-SendThread(todd-w510:11221):ClientCnxn$SendThread@952] - Opening socket 
connection to server todd-w510/127.0.0.1:11221
{code}

*Unconfigured*:
{code}
2012-07-16 13:02:31,501 [myid:] - INFO  
[main-SendThread(todd-w510:2181):ClientCnxn$SendThread@952] - Opening socket 
connection to server todd-w510/0:0:0:0:0:0:0:1:2181. Will not attempt to 
authenticate using SASL (Unable to locate a login configuration)
{code}
                
> Should not log SASL errors for non-secure usage
> -----------------------------------------------
>
>                 Key: ZOOKEEPER-1510
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1510
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.3
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: zookeeper-1510.txt
>
>
> Since SASL support was added, all connections with non-secure clients have 
> started logging messages like:
> 2012-07-01 02:13:34,986 WARN org.apache.zookeeper.client.ZooKeeperSaslClient: 
> SecurityException: java.lang.SecurityException: Unable to locate a login 
> configuration occurred when trying to find JAAS configuration.
> 2012-07-01 02:13:34,986 INFO org.apache.zookeeper.client.ZooKeeperSaslClient: 
> Client will not SASL-authenticate because the default JAAS configuration 
> section 'Client' could not be found. If you are not using SASL, you may 
> ignore this. On the other hand, if you expected SASL to work, please fix your 
> JAAS configuration.
> Despite the "you may ignore this" qualifier, I've seen a lot of users 
> confused by this message. Instead, it would be better to either log at DEBUG 
> level, or piggy back the SASL information onto the "Opening socket 
> connection" message (eg "Opening socket connection to X:2181. Will not use 
> SASL because no configuration was located.")

--
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

        

Reply via email to