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