Skip to content
Browse files

Merge pull request #22 from fbelzunc/JENKINS-33213-v2

[FIXED JENKINS-33213] TimeLimitExceededException produces "Automatic" group lookup strategy not to work correctly
  • Loading branch information...
fbelzunc committed Mar 1, 2016
2 parents 0c908ff + 26ebb1a commit 663ae60792818bfe362e4f444531a9f77f354b1c
@@ -45,6 +45,7 @@

import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.TimeLimitExceededException;
@@ -442,6 +443,8 @@ private String getPrincipalName(String username, String domainName) {
try {
found = chainGroupLookup(domainDN, userDN, context, groups);
duration = TimeUnit2.NANOSECONDS.toSeconds(System.nanoTime() - start);
} catch (TimeLimitExceededException e) {
LOGGER.log(Level.WARNING, "The LDAP request did not terminate within the specified time limit. AD will fall back to recursive lookup", e);
} catch (NamingException e) {
if (e.getMessage().contains("LDAP response read timed out")) {
LOGGER.log(Level.WARNING, "LDAP response read time out. AD will fall back to recursive lookup", e);

0 comments on commit 663ae60

Please sign in to comment.
You can’t perform that action at this time.