Hi All,

I am running 389 DS version 1.2.5, build number 2010.012.2034 on RHEL 5.2.

I have a problem that slapd didn't close a connection and eventually get into a CLOSE_WAIT state after my JAVA application exit.

The scenario only happen when my application registers a NamingListener via the JAVA JNDI (Java Naming Directory Interface).  I believe the NamingListener is equivalent to the Persistent Search.  This problem doesn't exist if I don't use the JNDI NamingListener capability.

From my understanding, I did everything correctly in my application.  I create a context, add a listener, do some stuffs, remove the listener and then close the context.

One thing I notice is that in the slapd's error log, I see the following...
"-get_ldapmessage_controls failed: 12 (Unavailable critical extension) (op=Abandon)".
This message prints out right after I remove the listener and before my application closes the context.

The closest bug report I found is this and it said the problem has been resolved.

At this point, I'm clueless.  :-(
Can someone help me or give me some recommendation that I could try?

I will attach my JAVA JNDI replicator along with this e-mail.  You will need to modify 2-3 lines of code to get it running in your environment.  Search for "MODIFY ME" and that should be the lines that you need to modify.