[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Unable to re-connect to *Local* OpenLDAP server using JLDAP when network is interrupted

Hi Jon,

I am running OpenLDAP on *Windows* (it's the port by Lucas Bergmann).

The steps to reproduce are:
- Startup the OpenLDAP server
- Use some client that connects to the server using *JLDAP* (from the *same*
machine as the OpenLDAP server)
- Then, disable/enable the Local Area Network in windows by right-clicking
the icon and selecting Disable/Enable.
- Now, without restarting the OpenLDAP server, try running the JLDAP client.
The client will fail on the LDAPConnection.connect(server, port) call with
an LDAPException saying "Connect error: connection refused".

Since this is a "connection refused" I'm thinking it's the OPenLDAP server
that is not responding appropriately when the network state is changed. If
you restart the ldap server at this point, it is possible to start
connecting to it. Also, I have the OpenLDAP server configured to listen on
the url: "ldap://<MACHINE-NAME>:389". Note I am not using the "localhost"
name for teh machine, but the actual machine name.

Hopefully you are able to reproduce this on linux/windows.

Do let me know if you have any further questions.

Best regards,

On 10/22/05, Jon Roberts <jon@jonanddeb.net> wrote:
> Safdar Kureishy wrote:
> > I'm running into this problem using JLDAP against an OpenLDAP server
> > whenever the machine temporarily loses its network connectivity, or
> perhaps
> > switches from one network to another.
> >
> > After this happens, I am unable to connect to the OpenLDAP server using
> the
> > LDAPConnection.connect() method on JLDAP. An LDAPException is thrown
> > indicating a "Connect error".
> I recently endured a series of nasty network interruptions. My
> OpenLDAP/JLDAP applications worked fine throughout on both local and
> remote hosts as long as the hosts were visible. In other words, I don't
> believe I can duplicate this problem. If you send instructions on
> recreating the scenario (w/ Linux), I'll be happy to try.
> > The only way it seems to fix the issue is to bounce the OpenLDAP server.
> At
> > that point a connection can get re-established.
> What I do run into sometimes is pooled connections failing when the
> directory server is bounced ie. your solution can be my failure. This
> separate issue is not surprising, but I will be interested to code a fix
> :)
> Jon Roberts
> www.mentata.com <http://www.mentata.com>