0

I am attempting to update our LDAP Connection pool with a health check. The health check requires an "entryDN" that will be queried, and should the query fail (either b/c it doesn't exist or it took too long), then the connection will be marked as invalid.

The Java class (FWIW) I am attempting to use is GetEntryLDAPConnectionPoolHealthCheck, and the Javadoc states:

This class provides an LDAP connection pool health check implementation that may be used to check the health of the associated server by verifying that a specified entry can be retrieved in an acceptable period of time. If the entry cannot be retrieved (either because it does not exist, or because an error occurs while attempting to retrieve it), or if it takes too long to retrieve the entry, then the associated connection will be classified as unavailable.

It seems very similar to me to the connection validation one uses with MySQL, but in the MySQL case the query is "SELECT 1", which is a very quick and standard query to execute.

What is an equivalent query that could be executed against an LDAP server?

KevinO
  • 4,303
  • 4
  • 27
  • 36
  • Just lookup the root DN, specifying to retrieve no attributes. – user207421 Apr 22 '18 at 02:59
  • @EJP, OK, that makes sense. I was originally under the impression that such an approach would require knowing something about the installation specific DN, but in digging through the code, it appears an empty `entryDN` is acceptable and that it will then use the server's root DSE. Thank you! – KevinO Apr 22 '18 at 03:14

0 Answers0