From 2419861cac53c9bc9a14a635700f88d08c3105c4 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Wed, 22 Apr 2015 20:56:29 +0000 Subject: [PATCH] HADOOP-11868. Invalid user logins trigger large backtraces in server log. Contributed by Chang Li (cherry picked from commit 0ebe84d30af2046775884c9fb1e054da31582657) --- .../authentication/server/AuthenticationFilter.java | 6 +++++- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java index 203ee41996b..9cfa3c2f299 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java @@ -560,7 +560,11 @@ public class AuthenticationFilter implements Filter { // exception from the filter itself is fatal errCode = HttpServletResponse.SC_FORBIDDEN; authenticationEx = ex; - LOG.warn("Authentication exception: " + ex.getMessage(), ex); + if (LOG.isDebugEnabled()) { + LOG.debug("Authentication exception: " + ex.getMessage(), ex); + } else { + LOG.warn("Authentication exception: " + ex.getMessage()); + } } if (unauthorizedResponse) { if (!httpResponse.isCommitted()) { diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 0e7cbbeb6de..1729064a55a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -12,6 +12,9 @@ Release 2.7.1 - UNRELEASED BUG FIXES + HADOOP-11868. Invalid user logins trigger large backtraces in server log + (Chang Li via jlowe) + Release 2.7.0 - 2015-04-20 INCOMPATIBLE CHANGES