• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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) :






 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic