ldap_error 81, Server connection lost

Tagged: 

This topic has 4 replies, 3 voices, and was last updated 5 years, 1 month ago by abdulwaheed.

  • Author
    Posts
  • #18626
     abdulwaheed
    Participant

    I have deployed OpenDJ application on one of the instances and written a java based application as well to access user details from OpenDJ using unbound LDAP SDK. All the things are up and running and working as well.

    The issue occurs when the concurrent request for search user hit the OpenDJ and I get the exception as:

    Error while checking the user abdulwaheed in LDAP: Error code 81, message LDAPSearchException(resultCode=81 (server down), numEntries=0, numReferences=0, errorMessage='The connection to server rfhat-iam-opendj.net:1389 was closed while waiting for a response to search request SearchRequest(baseDN='uid=abdulwaheed ,ou=people,dc=domain,dc=com', scope=BASE, deref=NEVER, sizeLimit=1, timeLimit=0, filter='(objectClass=*)', attrs={}).')
    Previously, I thought the issue can be with my java application which is not able to handle multiple concurrent requests and not able to get any free connection but after looking into error code, the error is coming from OpenDj (LDAP_ERROR 81).

    I looked into the OpenDJ connection as well and seems like all the config are set to its default value (unlimited).

    So, I am not sure what can be the issue and where I can look into it further?

    Note: There is no error found in log file and I am using OpenDj version 2-6.0

    #18630
     Bill Nelson
    Participant

    LDAP Error Code 81 is generated by the client, not the server, that is why you do not see an error in the log files.

    Please search for/refer to the list of “Client-Side Results Codes” found here: https://www.ldap.com/ldap-result-code-reference.

    #18642
     abdulwaheed
    Participant

    Thanks for the reply!

    I looked into LDAP configuration as well but I am not sure where to look into it anymore? I checked the log files of LDAP application as well but it does not show anything other than LDAP_ERROR_CODE 81.

    I would be great if you can point me to the right direction where I can look into for the above cause.

    Thanks!

    #18650
     Gentjan Kocaqi
    Participant

    Here is the description of your LDAP_ERROR_CODE 81:

    81: Server Down
    
    This generally indicates that a previously-established connection is no longer valid. It may indicate that the server to which the connection was established has shut down, but it could also mean that the connection was closed or has become invalid for some other reason (e.g., the client was idle for too long, there was a network outage, etc.).

    Do you see entries regarding this request on the <path-to-opendj-server>/logs/access? This to make sure that your request didn’t hit the OpenDJ server at all.

    Since you are developing using Unbound LDAP SDK, I will suggest to debug your Java application.

    #18663
     abdulwaheed
    Participant

    Hi Gentjan Kocaqi,

    Thanks for the reply.

    My java application is working fine till the time there is no load. I am getting the response for all the request.

    The issue occurs when I try performance testing on my machine and the line of code which throws 81 error is:

     try {
                return ldapConnectionPool.getEntry(dn) != null;
            }

    Currently, We have set min and max pool size as 2 & 5 respectively in LDAP and one more observation i.e. If we increase the size of min and max pool to 5 and 10 then we see the less request getting failed with error code 81. I guess this is correlated.

    What’s the ideal min and max value we should set?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?