Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.0
-
None
-
Reviewed
Description
In the code of class SaslPlainServer, the underlying exception is not included in the SaslException, which leads to below error message in HiveServer2:
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)
Make COEs very hard to understand what the real error is.
Can we change that line as:
} catch (Exception e) { throw new SaslException("PLAIN auth failed: " + e.getMessage(), e); }