Solaris 9 and InetAddress with IP hostname

Discussion in 'Java' started by C, Sep 11, 2003.

  1. C

    C Guest

    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
     
    C, Sep 11, 2003
    #1
    1. Advertising

  2. C

    C Guest

    seems to be a problem with NIS and local accounts

    (C) wrote in message news:<>...
    > 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
     
    C, Sep 16, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vertigo

    IP: long-> InetAddress

    vertigo, May 2, 2004, in forum: Java
    Replies:
    2
    Views:
    4,488
    Roedy Green
    May 3, 2004
  2. Madhur Ahuja
    Replies:
    1
    Views:
    786
    Paul Lutus
    Aug 29, 2004
  3. Linus

    InetAddress

    Linus, Jan 28, 2005, in forum: Java
    Replies:
    5
    Views:
    12,926
    Linus
    Jan 31, 2005
  4. AWieminer
    Replies:
    0
    Views:
    768
    AWieminer
    Jul 12, 2005
  5. mclTunes
    Replies:
    2
    Views:
    318
    mclTunes
    Feb 9, 2007
Loading...

Share This Page