Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3914

NPE in DS and proxy while performing proxied anonymous ldapsearch

    Details

    • Type: Bug
    • Status: Done
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: proxy
    • Labels:
      None

      Description

      This bug also probably exists in 4.0.0 and should be evaluated in order to determined whether it is a blocker for 4.0.0.

      Steps to reproduce:

      1. install two opendj instances replicated using the admin guide Example.ldif
      2. setup proxy to load balance across both servers
      3. performing an anonymous LDAP search against the proxy fails with suspicious error code
        $ ./bin/ldapsearch -h localhost -p 3389 -b dc=example,dc=com "(uid=bjensen)"
        $ echo $?
        255
        
      4. access logs on backend server indicate an NPE:
        {"eventName":"DJ-LDAP","client":{"ip":"127.0.0.1","port":45716},"server":{"ip":"127.0.0.1","port":2389},"request":{"protocol":"LDAP","operation":"SEARCH","connId":112048,"msgId":42,"dn":"dc=example,dc=com","scope":"sub","filter":"(uid=bjensen)","attrs":["ALL"]},"transactionId":"0","response":{"status":"FAILED","statusCode":"-1","elapsedTime":1,"elapsedTimeUnits":"MILLISECONDS","nentries":0},"timestamp":"2017-03-23T00:54:45.560Z","_id":"76f10fe4-6dfb-47e4-ba7e-4c93ba61d41d-1392957"}
        {"eventName":"DJ-LDAP","client":{"ip":"127.0.0.1","port":45716},"server":{"ip":"127.0.0.1","port":2389},"request":{"protocol":"LDAP","operation":"DISCONNECT","connId":112048,"message":"Worker Thread 4 encountered an uncaught exception while processing operation SearchOperation(connID=112048, opID=41, baseDN=dc=example,dc=com, scope=sub, filter=(uid=bjensen)): NullPointerException ()"},"transactionId":"0","response":{"status":"SUCCESSFUL","statusCode":"0","elapsedTime":0,"elapsedTimeUnits":"MILLISECONDS","reason":"Server Error"},"timestamp":"2017-03-23T00:54:45.560Z","_id":"76f10fe4-6dfb-47e4-ba7e-4c93ba61d41d-1392959"}
        
      5. and the error logs on the backend server provide more details:
        [23/Mar/2017:01:54:45 +0100] category=CORE severity=NOTICE msgID=139 msg=The Directory Server has sent an alert notification generated by class org.opends.server.api.DirectoryThread (alert type org.opends.server.UncaughtException, alert ID org.opends.messages.core-140): An uncaught exception during processing for thread Worker Thread 4 has caused it to terminate abnormally. The stack trace for that exception is: LdapException: Other: Worker Thread 4 encountered an uncaught exception while processing operation SearchOperation(connID=112048, opID=41, baseDN=dc=example,dc=com, scope=sub, filter=(uid=bjensen)): NullPointerException () (LdapException.java:202 ReactiveHandlersUtils.java:423 LdapClientConnection.java:365 TraditionalWorkerThread.java:171)
        
      6. the error is propagated to the proxy and finally back to the client. The proxy access logs sometimes contain the NPE and sometimes don't:
        {"eventName":"DJ-LDAP","client":{"ip":"127.0.0.1","port":49486},"server":{"ip":"127.0.0.1","port":3389},"request":{"protocol":"LDAP","operation":"SEARCH","connId":23,"msgId":10629,"dn":"dc=example,dc=com","scope":"sub","filter":"(uid=abergin)","attrs":["ALL"]},"transactionId":"0","response":{"status":"FAILED","statusCode":"80","elapsedTime":17,"elapsedTimeUnits":"MILLISECONDS","detail":"Worker Thread 9 encountered an uncaught exception while processing operation SearchOperation(connID=112021, opID=1, baseDN=dc=example,dc=com, scope=sub, filter=(uid=bparker)): NullPointerException ()","nentries":0},"timestamp":"2017-03-23T00:48:02.339Z","_id":"a529b72d-0dc1-400f-ac17-18ba790347a9-871539"}
        ...
        {"eventName":"DJ-LDAP","client":{"ip":"127.0.0.1","port":40586},"server":{"ip":"127.0.0.1","port":3389},"request":{"protocol":"LDAP","operation":"SEARCH","connId":24,"msgId":1,"dn":"dc=example,dc=com","scope":"sub","filter":"(uid=bjensen)","attrs":["ALL"]},"transactionId":"0","response":{"status":"FAILED","statusCode":"-1","elapsedTime":1,"elapsedTimeUnits":"MILLISECONDS","nentries":0},"timestamp":"2017-03-23T00:52:44.819Z","_id":"a529b72d-0dc1-400f-ac17-18ba790347a9-871553"}
        

        Attachments

          Activity

            People

            • Assignee:
              JnRouvignac Jean-Noël Rouvignac
              Reporter:
              matthew Matthew Swift
              Dev Assignee:
              Jean-Noël Rouvignac
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: