Holding lock netscape.ldap.ldapconnection | Weblogic

Oracle Weblogic Server

After 2.5 hours, the LDAP provider connections do not return results and a stuck thread exception is logged, see below:

<Error> <WebLogicServer> <host_name><server_name> <[ACTIVE] ExecuteThread: ‘2’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <> <> <> <1298874440194> <BEA-000337> <[STUCK] ExecuteThread: ‘1’ for queue: ‘weblogic.kernel.Default (self-tuning)’ has been busy for “668” seconds working on the request “weblogic.servlet.internal.ServletRequestImpl@fee0da0[
POST /MgFrontend/j_security_check HTTP/1.1
……
]”, which is more than the configured time (StuckThreadMaxTime) of “600” seconds. Stack trace:
Thread-21 “[STUCK] ExecuteThread: ‘1’ for queue: ‘weblogic.kernel.Default (self-tuning)'” <alive, suspended, waiting, priority=1, DAEMON> {
— Waiting for notification on: netscape.ldap.LDAPResponseListener@ff57db3[fat lock]
java.lang.Object.wait(Object.java:???)
java.lang.Object.wait(Object.java:485)
netscape.ldap.LDAPMessageQueue.waitForMessage(LDAPMessageQueue.java:198)
netscape.ldap.LDAPMessageQueue.waitFirstMessage(LDAPMessageQueue.java:100)
netscape.ldap.LDAPConnection.sendRequest(LDAPConnection.java:1782)
^– Holding lock: netscape.ldap.LDAPConnection@ef6473b[thin lock]
netscape.ldap.LDAPConnection.simpleBind(LDAPConnection.java:1752)
netscape.ldap.LDAPConnection.authenticate(LDAPConnection.java:1260)
netscape.ldap.LDAPConnection.authenticate(LDAPConnection.java:1273)
netscape.ldap.LDAPConnection.bind(LDAPConnection.java:1562)

The LDAP server became unresponsive causing the thread/user to wait for a response or an error.

To avoid waiting too long for an error when the LDAP server is not responding, a read-timeout property can be set on an LDAP connection.

Setting read-timeout property could avoid this situation but this parameter doesn’t exist in the WLS configuration for OpenLDAP.

The only parameters in the WebLogic configuration for OpenLDAP are:

Results Time Limit
Connect Timeout

The Results Time Limit definition is the one which is more related to read-timeout.

The Results Time Limit property of the OpenLDAP Authentication provider in the WLS security configuration should be set to a higher value. For example, setting this to 30000 resolved the above issue in one user’s environment.

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

1 Response

  1. Siva says:

    Even I get a similar error. I am using JSSSocketFactory socket with regular LDAP object. When it get to the point of .authenticate(user,pwd) it fails. This is random, some times it works and sometimes it fails.. Please help.
    JSSESocketFactory fact = new JSSESocketFactory(null);
    LDAPConnection ld = new LDAPConnection(fact);
    ld.connet(a,b);
    ld.authenticate(a,b);
    http-8080-2|ERROR|netscape.ldap.LDAPException|netscape.ldap.LDAPException: The connection is not available (80)
    at netscape.ldap.LDAPConnection.sendRequest(LDAPConnection.java:1809)
    at netscape.ldap.LDAPConnection.internalBind(LDAPConnection.java:1754)
    at netscape.ldap.LDAPConnection.authenticate(LDAPConnection.java:1294)
    at netscape.ldap.LDAPConnection.authenticate(LDAPConnection.java:1303)
    at netscape.ldap.LDAPConnection.authenticate(LDAPConnection.java:1221)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.