Details
Description
Add unboundid configurable option RetryFailedOperationsDueToInvalidConnections
Some ldap servers and/or network appliances between Sakai and the ldap server may shutdown idle connections and the unboundid sdk will throw an exception
LDAPException(resultCode=81 (server down), numEntries=0, numReferences=0, diagnosticMessage='The connection to server MYTESTSERVER:MYPORT was closed while waiting for a response to search request SearchRequest(baseDN='MYBASEDN', scope=SUB, deref=NEVER, sizeLimit=1, timeLimit=9000, filter='uid=MYUSERNAME', attrs={uid, givenName, sn, mail}): An I/O error occurred while trying to read the response from the server: SocketException(Connection reset), ldapSDKVersion=4.0.8, revision=28812'')
several unboundid forums suggest using:
LDAPConnectionPool.setRetryFailedOperationsDueToInvalidConnections()
https://sourceforge.net/p/ldap-sdk/discussion/1001257/thread/a9bc7b98/#5565
https://sourceforge.net/p/ldap-sdk/discussion/1001257/thread/acb4744b/#2896
https://sourceforge.net/p/ldap-sdk/discussion/1001257/thread/a9bc7b98/#9b18
https://sourceforge.net/p/ldap-sdk/discussion/1001257/thread/2cd4e0de/#2a19
from the first article above:
if an operation performed directly against the pool (i.e., using one of the pool's add, bind, search, etc. methods, rather than checking a connection out and doing something with it) does not complete successfully, then the default health check will determine whether that failure may indicate that the connection is no longer valid. If the health check indicates that the connection may no longer be valid, then it will throw away that connection and create another one to take its place. If automatic retry is enabled, then the pool will automatically retry that failed operation on the newly-established connection.
It would be great to add a configurable option in unboundid-ldap.xml to allow setting setRetryFailedOperationsDueToInvalidConnections
note that there are two overloaded versions of that function:
setRetryFailedOperationsDueToInvalidConnections(boolean retryFailedOperationsDueToInvalidConnections)
setRetryFailedOperationsDueToInvalidConnections(java.util.Set<OperationType> operationTypes)
It would be simplest to use the boolean version, but the other would give more fine tuned options.
Gliffy Diagrams
Zeplin
Attachments
Issue Links
- is related to
-
SAK-44410 Unboundid - add options for setHealthCheckIntervalMillis and setHealthCheck
-
- RESOLVED
-