File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(how to) Read entries from LDAP? getting server down error

 
christine clarin
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

May I ask for help on connecting to an LDAP directory (for reading only) from a Java code? I am getting this error:

netscape.ldap.LDAPException: Server down (80); Unknown error
at netscape.ldap.LDAPConnThread.networkError(LDAPConnThread.java:619)
at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:436)


Note: i also searched for possible reasons for this error but search says that I should check if my server is down, but pinging the IP address below shows that the server is up...i don't know what's wrong. I really hope you could help me here, am I missing something? Thank you very much!!!

and I have the following code (searched from google) :






 
Rob Spoor
Sheriff
Pie
Posts: 20393
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
christine clarin wrote:Note: i also searched for possible reasons for this error but search says that I should check if my server is down, but pinging the IP address below shows that the server is up...i don't know what's wrong.

By pinging you can only check if the machine is up. The LDAP server on the machine may very well be down.
 
Joanne Neal
Rancher
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are also trying to connect to port 636 which is the default LDAP SSL port. Maybe your server doesn't have SSL configured or turned on.
Have you tried connecting on port 389 (the default non SSL LDAP port).

Another possibility is that your server is not using the default port numbers.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
christine clarin wrote:netscape.ldap.LDAPException: Server down (80); Unknown error
at netscape.ldap.LDAPConnThread.networkError(LDAPConnThread.java:619)
at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:436)

What library / API are you using to connect to the LDAP server? The word "netscape" suggests that you're using something that's really old and outdated. The standard API to talk to directory services, such as LDAP servers, is JNDI. (You'd need something, such as a Java EE application server, that provides the JNDI implementation, though).
 
christine clarin
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joanne Neal wrote:You are also trying to connect to port 636 which is the default LDAP SSL port. Maybe your server doesn't have SSL configured or turned on.
Have you tried connecting on port 389 (the default non SSL LDAP port).

Another possibility is that your server is not using the default port numbers.


hm, this is what our network admin advised me to use that is why I am using it, is there a way to check if the LDAP server is indeed up if pinging is not a sure way to check? thanks!
 
christine clarin
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for this. I tried looking for JNDI tutorials and I came across this LDAP and JNDI which was very helpful, I still haven't deployed in our server to test (still waiting for my turn ) but hopefully it should do the trick, I'm a little confused on the queries though, how do I list just the OU names from the LDAP? I am using this:



Thank you very much. any help is greatly appreciated
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic