This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes (how to) Read entries from LDAP? getting server down error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "(how to) Read entries from LDAP? getting server down error" Watch "(how to) Read entries from LDAP? getting server down error" New topic
Author

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

christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
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

Joined: Oct 27, 2005
Posts: 19651
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3419
    
  12
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.


Joanne
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

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).

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
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

Joined: Feb 05, 2005
Posts: 106
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: (how to) Read entries from LDAP? getting server down error
 
Similar Threads
SSL into eDirectory
Websphere & LDAP servlet
JNDI, LDAP, & Active Directory
LDAP Search is inconsistent
what's the difference between java sdk and ms outlook when connecting to ldap?