From 7b96fce0aef73749b7127a9a444c14e7770afa06 Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Thu, 27 Oct 2011 20:16:02 +0000 Subject: [PATCH] svn merge -c 1182641 from trunk for HADOOP-7509. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1189986 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/ipc/Server.java | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 3c449d5d8f8..bc8c8cefaba 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -416,6 +416,9 @@ Release 0.23.0 - Unreleased HADOOP-7668. Add a NetUtils method that can tell if an InetAddress belongs to local host. (suresh) + HADOOP-7509. Improve exception message thrown when Authentication is + required. (Ravi Prakash via suresh) + OPTIMIZATIONS HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole 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 e1906e0c715..50b06dc342d 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 @@ -1171,8 +1171,12 @@ public abstract class Server { throw new IOException("Unable to read authentication method"); } if (isSecurityEnabled && authMethod == AuthMethod.SIMPLE) { - AccessControlException ae = new AccessControlException( - "Authentication is required"); + AccessControlException ae = new AccessControlException("Authorization (" + + CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION + + ") is enabled but authentication (" + + CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION + + ") is configured as simple. Please configure another method " + + "like kerberos or digest."); setupResponse(authFailedResponse, authFailedCall, Status.FATAL, null, ae.getClass().getName(), ae.getMessage()); responder.doRespond(authFailedCall);