Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] LDAP UnboundID bug? (hardcoded JNDI reference)

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] LDAP UnboundID bug? (hardcoded JNDI reference)


Chronological Thread 
  • From: Shilen Patel <>
  • To: Baron Fujimoto <>
  • Cc: Grouper Users <>
  • Subject: Re: [grouper-users] LDAP UnboundID bug? (hardcoded JNDI reference)
  • Date: Mon, 7 Jun 2021 11:39:48 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=duke.edu; dmarc=pass action=none header.from=duke.edu; dkim=pass header.d=duke.edu; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bx4YM3QYmUKjk4nB8eFatIpLarEX2BgipeC5K6F9PI8=; b=Xln/zIgq2P+pF5HOBaeCotEi88uWBP65TF3TY/F/G1LVkEhiMTm8NQbqm2OQeIgXaojB6PLcsH52zLML9tU0N2oi0A7KVQgNdNvVkPFbydXgEf/gTtQABFP2/inSYwQHJ16KRWcJPoYRrGH0qmiTUaqjPleW7txZvgBvnCV1w0Cq2PeIh0oNL9C/SCzNrjq9qpyv8g9bH7diQsCtZ4mt1l60jvWWRUOvGXU9yLFNm5y+Rv7V4lghFCv7bKs7ZfJ82WNqmm0HnZ5NHD2ffIGbwRuth92+vwIDxvRzXCkhrPddNqmzKJWJA6z/H7l+Tx9o+7erVv/Z8owhoeYg8yZDqQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HkpZeg01/8ysZKvFyhLAN1gMwCSN3sQqlYN6cokpPMNzNwqJX/IQ7uL4bm+FoXovQXKDgtxPg7uW/lQk3I/0oQBCfxm9HKECJMprDmmabI0V5XrduYP9v37Q1KtIcS0bVsQpGcfulDDaiUdHpGEaCcxdYQXW58ctHqMKOfYzxe+7kQemkApXFhHRgir1pmOXL6yxTdJGXdnS3ilrwUm3SXyoCoKRFYxXaEetNy/5CXHETPiugorK89V5I1FqgubCNIO6QFZ9nX6jFnY827ruDxTgLLK2MAHixM6+Zc7RxK2YmXq8/TekmgYJ+XKG/a2NN4hoWF+jV13RpNcB+5VVIA==

We’ve seen the issues you’re describing before and validating at an interval that’s less than the F5 timeout has seemed to have avoided the issue in other places.  You may want to try that as a possible quick workaround.  You can either add those two properties or if you’re on a recent 2.5 container, you can configure it using the external systems UI screen.  If you continue to see exceptions, it might be helpful to see the full stacktrace.

 

- Shilen

 

From: <> on behalf of Baron Fujimoto <>
Reply-To: Baron Fujimoto <>
Date: Friday, June 4, 2021 at 7:10 PM
To: Shilen Patel <>
Cc: Grouper Users <>
Subject: Re: [grouper-users] LDAP UnboundID bug? (hardcoded JNDI reference)

 

Our timeout issue has a couple of necessary conditions:

- at least one of either our application or LDAP hosts behind anF5 load balancer

- JDK version ≥ 8u231

 

We had a support case open w/ Oracle re this, but after months of back and forth, they ultimately determined that the JDK was acting according to spec and that it was the LDAP libraries and/or applications that were not handling results properly.

 

In Grouper we see this manifest as failed subject lookups due to closed LDAP connections. These are representative log excerpts:

 

=====

[https-jsse-nio-8443-exec-10] ERROR LdapSourceAdapter.getLdapResultsHelper(594) - < ... > - Ldap Exception: Problem with ldap conection: personLdap,

Error querying ldap server id: personLdap, searchDn: dc=hawaii,dc=edu, filter: '(& (uid=foobar) (objectclass=uhEduPerson))', returning attributes: cn, uhuuid, uid, sn, givenname

java.lang.RuntimeException: Problem with ldap conection: personLdap,

Error querying ldap server id: personLdap, searchDn: dc=hawaii,dc=edu, filter: '(& (uid=foobar) (objectclass=uhEduPerson))', returning attributes: cn, uhuuid, uid, sn, givenname

[...]

Caused by: [org.ldaptive.LdapException@1471483139::resultCode=null, matchedDn=null, responseControls=null, referralURLs=null, messageId=-1, message=javax.naming.NamingException: LDAP connection has been closed; remaining name 'dc=hawaii,dc=edu', providerException=javax.naming.Nam

ingException: LDAP connection has been closed; remaining name 'dc=hawaii,dc=edu']

[...]

Caused by: javax.naming.NamingException: LDAP connection has been closed; remaining name 'dc=hawaii,dc=edu'

[https-jsse-nio-8443-exec-10] WARN  WsSubjectLookup.retrieveSubjectIfNeeded(328) - < ... > - WsSubjectLookup[

  subjectFindResult=SUCCESS,subjectIdentifier=foobar]

edu.internet2.middleware.subject.SourceUnavailableException: Ldap Exception: Problem with ldap conection: personLdap,

Error querying ldap server id: personLdap, searchDn: dc=hawaii,dc=edu, filter: '(& (uid=foobar) (objectclass=uhEduPerson))', returning attributes: cn, uhuuid, uid, sn, givenname

[...]

Caused by: java.lang.RuntimeException: Problem with ldap conection: personLdap,

Error querying ldap server id: personLdap, searchDn: dc=hawaii,dc=edu, filter: '(& (uid=foobar) (objectclass=uhEduPerson))', returning attributes: cn, uhuuid, uid, sn, givenname

Caused by: [org.ldaptive.LdapException@1471483139::resultCode=null, matchedDn=null, responseControls=null, referralURLs=null, messageId=-1, message=javax.naming.NamingException: LDAP connection has been closed; remaining name 'dc=hawaii,dc=edu', providerException=javax.naming.NamingException: LDAP connection has been closed; remaining name 'dc=hawaii,dc=edu']

[...]

Caused by: javax.naming.NamingException: LDAP connection has been closed; remaining name 'dc=hawaii,dc=edu'

=====

 

Our interpretation of what is happening is that the F5 is dropping the LDAP connection, but this is not detected up on the Grouper end. The pool validator apparently does not check before attempting to use the expected LDAP connection, nor does it retry upon the resulting connection error.

 

Reviewing our grouper-loader.properties, it doesn't look like we have any ldap.personValidate* properties set. Although some of the properties appear to be fairly self-descriptive, I haven't found a good reference for the properties in the Grouper wiki. Did I overlook it somewhere? For example, do we need to set ldap.personLdap.customizePooling=true if we want to experiment with the other dap.personValidate* properties?

 

I'm also subscribed to the incommon-grouper slack channel, but I confess to being a little ambivalent about it. On the one hand, folks there are very helpful and it often seems more responsive than the mailing list. On the other hand, slack is also more ephemeral and requires real-time monitoring and doesn't seem as useful for researching what may have gone before like with a mailing list archive (though I am no sort of power user, so I could well be overlooking some slack feature that would help with these issues).

 

On Fri, Jun 4, 2021 at 1:47 AM Shilen Patel <> wrote:

We talked before about upgrading to the latest ldaptive version, which has its own LDAP implementation.  Or using UnboundID directly.  I think the plan was to change this in 2.6. 

 

By the way, what timeout issue are you having currently?  What pool validator settings do you have?  I use the following (to validate every 5 minutes) to avoid timeout issues.

 

ldap.personLdap.validatePeriodically = true

ldap.personLdap.validateTimerPeriod = 300000

 

Are you on Slack?

 

- Shilen 

 

From: <> on behalf of Baron Fujimoto <>
Reply-To: Baron Fujimoto <>
Date: Thursday, June 3, 2021 at 8:50 PM
To: Grouper Users <>
Subject: [grouper-users] LDAP UnboundID bug? (hardcoded JNDI reference)

 

We were trying to use an UnboundID config to work around an F5/JDK/LDAP timeout bug, but we think we've encountered a bug in Grouper that prevents us from using this workaround.

 

When trying UnboundID, Grouper starts up with no issue, but later when LDAP is used it fails at this line (as determined by a consultants we're working with):

 

The source appears to be hard-coded as a JndiProviderConfig and isn't adaptable to UnboundID providers such as org.ldaptive.provider.unboundid.UnboundIDProvider. The consultants suggest that the Grouper devs would need to build in functionality to support both or drop JNDI support and switch these items to UnboundID.

 

--

Baron Fujimoto <> :: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum


 

--

Baron Fujimoto <> :: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum




Archive powered by MHonArc 2.6.24.

Top of Page