Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1814

[patch] Using anon connection results in UnbindRequestHandler reporting 'LdapNoSuchObjectException: ERR_268 Cannot find a partition for '


    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M11
    • Fix Version/s: 2.0.0-M12
    • Component/s: core
    • Labels:


      I use anonymous connection to an embedded ApacheDS instance (DefaultDirectoryService allows anon access by default). I receive multiple errors like:

      8671 ERROR o.a.d.s.l.h.r.UnbindRequestHandler - ERR_169 failed to unbind session properly ERR_268 Cannot find a partition for
      at ~[]
      at ~[]
      at$1.unbind( ~[]
      at ~[]
      at ~[]
      at ~[]
      at ~[]
      at []
      at []
      at []
      at []
      at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived( [org.apache.mina.core-2.0.4.jar:na]
      at []
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived( [org.apache.mina.core-2.0.4.jar:na]

      Debugging reveals that when using anonymous connection, DN in UnbindOperationContext is empty. If I connect using admin account, this errors stop appearing.

      This is not just a matter of printing out an exception: looking at UnbindRequestHandler source code, the exception is thrown from
      session.getCoreSession().unbind( unbindRequest );
      so the following lines will not be executed due to the exception:
      session.getIoSession().close( true );
      ldapServer.getLdapSessionManager().removeLdapSession( session.getIoSession() );

      I don't know how important are the two last ones. Please consider using Java 'finally' block if omitting these operations may leave server in an unstable state.

      To fix the bug, I suggest skipping unbind operation for an empty DN from UnbindOperationContext - see the attached patch. I leave UnbindRequestHandler changes for your own decision, as I don't know the code good enough.

      1. unbind.patch
        0.8 kB
        Piotr Kubowicz


        No work has yet been logged on this issue.


          • Assignee:
            Piotr Kubowicz
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created: