Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Solaris 9 and InetAddress with IP hostname

Reply
Thread Tools

Solaris 9 and InetAddress with IP hostname

 
 
C
Guest
Posts: n/a
 
      09-11-2003
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(Ine tAddress.java:614)
at java.net.InetAddress.getAllByName0(InetAddress.jav a:563)
at java.net.InetAddress.getAllByName0(InetAddress.jav a:535)
at java.net.InetAddress.getByName(InetAddress.java:44 4)
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
 
Reply With Quote
 
 
 
 
C
Guest
Posts: n/a
 
      09-16-2003
seems to be a problem with NIS and local accounts

http://www.velocityreviews.com/forums/(E-Mail Removed) (C) wrote in message news:<(E-Mail Removed). com>...
> 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(Ine tAddress.java:614)
> at java.net.InetAddress.getAllByName0(InetAddress.jav a:563)
> at java.net.InetAddress.getAllByName0(InetAddress.jav a:535)
> at java.net.InetAddress.getByName(InetAddress.java:44 4)
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any known incompatabilities with InetAddress and BIND 9?... mclTunes Java 2 02-09-2007 07:16 PM
RMI: take ip/hostname what client was using and give it back as aremote objects hostname AWieminer Java 0 07-12-2005 08:05 PM
InetAddress Linus Java 5 01-31-2005 09:25 AM
performing reverse DNS lookup with InetAddress Madhur Ahuja Java 1 08-29-2004 07:57 AM
IP: long-> InetAddress vertigo Java 2 05-02-2004 11:59 PM



Advertisments