Solaris 9 and InetAddress with IP hostname

C

C

Hi,

I have some JDK1.3.1 code (to bind to LDAP) and if I use the IP
address of the LDAP server it works fine, but if I use the hostname
then the process just hangs.
(I can ping both the hostname and the IP address fine, so it's *not* a
DNS problem)
kill -3 shows it hanging at the following point:
at java.net.InetAddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:614)
at java.net.InetAddress.getAllByName0(InetAddress.java:563)
at java.net.InetAddress.getAllByName0(InetAddress.java:535)
at java.net.InetAddress.getByName(InetAddress.java:444)
at java.net.Socket.<init>(Socket.java:95)

However, this problem only occurs on Solaris 9 (for Solaris 8 then
either IP address or hostname works fine).

Both machines have 2 IP addresses....

The code is standard & simple:
//openLDAP.put(Context.PROVIDER_URL, "ldap://111.222.333.444:636/");
openLDAP.put(Context.PROVIDER_URL, "ldap://ldap:636/");
DirContext ctx = new InitialDirContext(openLDAP);

Has anyone experienced such problems with Java and Solaris 9 before?

Thanks

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top