hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [18/49] hadoop git commit: HDFS-7857. Improve authentication failure WARN message to avoid user confusion. Contributed by Yongjun Zhang.
Date Thu, 12 Mar 2015 23:04:37 GMT
HDFS-7857. Improve authentication failure WARN message to avoid user confusion. Contributed
by Yongjun Zhang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d799fbe1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d799fbe1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d799fbe1

Branch: refs/heads/YARN-2928
Commit: d799fbe1ccf8752c44f087e34b5f400591d3b5bd
Parents: b3e6992
Author: Yongjun Zhang <yzhang@cloudera.com>
Authored: Sun Mar 8 20:39:46 2015 -0700
Committer: Yongjun Zhang <yzhang@cloudera.com>
Committed: Sun Mar 8 20:39:46 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/ipc/Server.java         | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d799fbe1/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
index 893e0eb..d2d61b3 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
@@ -1324,10 +1324,15 @@ public abstract class Server {
           saslResponse = processSaslMessage(saslMessage);
         } catch (IOException e) {
           rpcMetrics.incrAuthenticationFailures();
+          if (LOG.isDebugEnabled()) {
+            LOG.debug(StringUtils.stringifyException(e));
+          }
           // attempting user could be null
+          IOException tce = (IOException) getTrueCause(e);
           AUDITLOG.warn(AUTH_FAILED_FOR + this.toString() + ":"
-              + attemptingUser + " (" + e.getLocalizedMessage() + ")");
-          throw (IOException) getTrueCause(e);
+              + attemptingUser + " (" + e.getLocalizedMessage()
+              + ") with true cause: (" + tce.getLocalizedMessage() + ")");
+          throw tce;
         }
         
         if (saslServer != null && saslServer.isComplete()) {


Mime
View raw message