Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While debugging a LDAP connection class, if I terminate the process and do not close the LDAP connection by going into finally block. From next time I am not able to connect back to the LDAP directory. It throws follwoing exception for me

Caused by: javax.naming.CommunicationException: [Root exception is Connection timed out: connect]
    at com.sun.jndi.ldap.Connection.<init>(

Is it issue from the server side or some java daemon thred?

share|improve this question

migrated from Aug 31 '12 at 11:01

This question came from our site for professional and enthusiast programmers.

So close the connection in the finally block. You are leaking connections. – EJP Aug 27 '12 at 21:57
up vote 0 down vote accepted

It looks like the issue cause is server-side. Which LDAP server are you using ?

share|improve this answer
Not sure. I have got the connection details from my client. How should I address it then? – Himanshu Yadav Aug 27 '12 at 17:20
No. I don't as it's client's Active Directory. – Himanshu Yadav Aug 27 '12 at 17:35
Perhaps you should try with a standard ldap client (for example I use apache directory studio for eclipse which has a client, and which can launch LDAP server instance for developpement) – phsym Aug 27 '12 at 17:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.