Author: markt Date: Wed Aug 28 14:05:19 2013 New Revision: 1518212 URL: http://svn.apache.org/r1518212 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 Reduce log level of exception messages that are logged for re-tries. Make clear in the message that a retry is taking place.
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1518210 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=1518212&r1=1518211&r2=1518212&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java Wed Aug 28 14:05:19 2013 @@ -1048,7 +1048,7 @@ public class JNDIRealm extends RealmBase with broken SSL */ // log the exception so we know it's there. - containerLog.warn(sm.getString("jndiRealm.exception"), e); + containerLog.info(sm.getString("jndiRealm.exception.retry"), e); // close the connection so we know it will be reopened. if (context != null) @@ -1063,7 +1063,7 @@ public class JNDIRealm extends RealmBase } catch (CommunicationException e) { // log the exception so we know it's there. - containerLog.warn(sm.getString("jndiRealm.exception"), e); + containerLog.info(sm.getString("jndiRealm.exception.retry"), e); // close the connection so we know it will be reopened. if (context != null) @@ -1078,7 +1078,7 @@ public class JNDIRealm extends RealmBase } catch (ServiceUnavailableException e) { // log the exception so we know it's there. - containerLog.warn(sm.getString("jndiRealm.exception"), e); + containerLog.info(sm.getString("jndiRealm.exception.retry"), e); // close the connection so we know it will be reopened. if (context != null) @@ -2007,7 +2007,7 @@ public class JNDIRealm extends RealmBase } catch (CommunicationException e) { // log the exception so we know it's there. - containerLog.warn(sm.getString("jndiRealm.exception"), e); + containerLog.info(sm.getString("jndiRealm.exception.retry"), e); // close the connection so we know it will be reopened. if (context != null) @@ -2022,7 +2022,7 @@ public class JNDIRealm extends RealmBase } catch (ServiceUnavailableException e) { // log the exception so we know it's there. - containerLog.warn(sm.getString("jndiRealm.exception"), e); + containerLog.info(sm.getString("jndiRealm.exception.retry"), e); // close the connection so we know it will be reopened. if (context != null) @@ -2142,7 +2142,7 @@ public class JNDIRealm extends RealmBase connectionAttempt = 1; // log the first exception. - containerLog.warn(sm.getString("jndiRealm.exception"), e); + containerLog.info(sm.getString("jndiRealm.exception.retry"), e); // Try connecting to the alternate url. context = new InitialDirContext(getDirectoryContextEnvironment()); Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties?rev=1518212&r1=1518211&r2=1518212&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties Wed Aug 28 14:05:19 2013 @@ -56,6 +56,7 @@ jndiRealm.authenticateFailure=Username { jndiRealm.authenticateSuccess=Username {0} successfully authenticated jndiRealm.close=Exception closing directory server connection jndiRealm.exception=Exception performing authentication +jndiRealm.exception.retry=Exception performing authentication. Retrying... jndiRealm.open=Exception opening directory server connection memoryRealm.authenticateFailure=Username {0} NOT successfully authenticated memoryRealm.authenticateSuccess=Username {0} successfully authenticated Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1518212&r1=1518211&r2=1518212&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 28 14:05:19 2013 @@ -144,6 +144,12 @@ Deprecate the Tomcat proprietary WebSocket API in favour of the new JSR-356 implementation. (markt) </update> + <fix> + <bug>55494</bug>: Reduce severity of log message from warning to + information for JNDI Realm connection issues where the JNDI Realm + automatically re-tries the action that failed. Make clear in the log + message that the action is being re-tried. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org