[
https://issues.apache.org/jira/browse/HADOOP-12318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694614#comment-14694614
]
Steve Loughran commented on HADOOP-12318:
-----------------------------------------
Looking @ the patch more, the patch itself isn't introducing the getmessage
bug, merely retaining it. Even so, this is the time to fix as its only going to
lead to messages like "auth failed cause: Null"
> Expose underlying LDAP exceptions in SaslPlainServer
> ----------------------------------------------------
>
> Key: HADOOP-12318
> URL: https://issues.apache.org/jira/browse/HADOOP-12318
> Project: Hadoop Common
> Issue Type: Improvement
> Components: security
> Affects Versions: 2.8.0
> Reporter: Mike Yoder
> Assignee: Mike Yoder
> Priority: Minor
> Fix For: 2.8.0
>
> Attachments: HADOOP-12318.000.patch
>
>
> In the code of class
> [SaslPlainServer|http://github.mtv.cloudera.com/CDH/hadoop/blob/cdh5-2.6.0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslPlainServer.java#L108],
> the underlying exception is not included in the {{SaslException}}, which
> leads to below error message in HiveServer2:
> {noformat}
> 2015-07-22 11:50:28,433 DEBUG
> org.apache.thrift.transport.TSaslServerTransport: failed to open server
> transport
> org.apache.thrift.transport.TTransportException: PLAIN auth failed: Error
> validating LDAP user
> at
> org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
> at
> org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
> at
> org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
> at
> org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
> at
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:268)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Make COEs very hard to understand what the real error is.
> Can we change that line as:
> {code}
> } catch (Exception e) {
> throw new SaslException("PLAIN auth failed: " + e.getMessage(), e);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)