InetAddress.isReachable

Discussion in 'Java' started by Roedy Green, Mar 23, 2010.

  1. Roedy Green

    Roedy Green Guest

    InetAddress.isReachable always returns false. I am puzzled why.

    My router is set to pass UDP port 7 through. I can ping google.ca.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
     
    Roedy Green, Mar 23, 2010
    #1
    1. Advertising

  2. Roedy Green

    Roedy Green Guest

    On Tue, 23 Mar 2010 13:26:22 +0000, rossum <>
    wrote, quoted or indirectly quoted someone who said :

    >What timeout are you using? Too short a timeout may cause a false
    >return if the host takes too long to reach.


    I was using 10 seconds. I'll try bumping up the TTL.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
     
    Roedy Green, Mar 23, 2010
    #2
    1. Advertising

  3. Roedy Green

    Arne Vajhøj Guest

    On 23-03-2010 08:24, Roedy Green wrote:
    > InetAddress.isReachable always returns false. I am puzzled why.
    >
    > My router is set to pass UDP port 7 through. I can ping google.ca.


    Most *nix implementation use ICMP (ping).

    The windows version is said to use TCP to port 7 (echo).

    Arne
     
    Arne Vajhøj, Mar 24, 2010
    #3
  4. Roedy Green

    Roedy Green Guest

    On Tue, 23 Mar 2010 07:03:30 -0700, Roedy Green
    <> wrote, quoted or indirectly quoted
    someone who said :

    >
    >I was using 10 seconds. I'll try bumping up the TTL.


    no joy.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
     
    Roedy Green, Mar 24, 2010
    #4
  5. Roedy Green

    Arne Vajhøj Guest

    On 23-03-2010 20:55, Roedy Green wrote:
    > On Tue, 23 Mar 2010 07:03:30 -0700, Roedy Green
    > <> wrote, quoted or indirectly quoted
    > someone who said :
    >> I was using 10 seconds. I'll try bumping up the TTL.

    >
    > no joy.


    No surprise.

    Assuming that you are using Windows, then you are
    trying to use TCP through a router
    where you have opened for UDP to a site that you
    know supports ICMP.

    Arne
     
    Arne Vajhøj, Mar 24, 2010
    #5
  6. Roedy Green

    EJP Guest

    On 23/03/2010 11:24 PM, Roedy Green wrote:
    > InetAddress.isReachable always returns false. I am puzzled why.
    >
    > My router is set to pass UDP port 7 through. I can ping google.ca.


    InetAddress.isReachable uses *TCP* port 7.
     
    EJP, Mar 26, 2010
    #6
  7. Roedy Green

    Roedy Green Guest

    On Fri, 26 Mar 2010 03:55:58 GMT, EJP
    <> wrote, quoted or indirectly quoted
    someone who said :

    >> My router is set to pass UDP port 7 through. I can ping google.ca.

    >
    >InetAddress.isReachable uses *TCP* port 7.


    I have them both open. Still no joy.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    If you tell a computer the same fact in more than one place, unless you have an automated mechanism to ensure they stay in sync, the versions of the fact will eventually get out of sync.
     
    Roedy Green, Mar 26, 2010
    #7
  8. Roedy Green wrote:
    > Roedy Green Canadian Mind Products
    > http://mindprod.com


    > If you tell a computer the same fact in more than one place, unless
    > you have an automated mechanism to ensure they stay in sync,
    > the versions of the fact will eventually get out of sync.


    I phrase that as

    Anything you write down in more than place,
    is wrong in more than one place
     
    David Zimmerman, Mar 26, 2010
    #8
  9. Roedy Green

    Arne Vajhøj Guest

    On 26-03-2010 11:13, Roedy Green wrote:
    > On Fri, 26 Mar 2010 03:55:58 GMT, EJP
    > <> wrote, quoted or indirectly quoted
    > someone who said :
    >>> My router is set to pass UDP port 7 through. I can ping google.ca.

    >>
    >> InetAddress.isReachable uses *TCP* port 7.

    >
    > I have them both open. Still no joy.


    It appears that google.ca is not listening on port 7, so
    no surprise in that.

    Arne
     
    Arne Vajhøj, Mar 27, 2010
    #9
  10. Roedy Green

    Roedy Green Guest

    On Fri, 26 Mar 2010 13:25:47 -0400, David Zimmerman <>
    wrote, quoted or indirectly quoted someone who said :

    >I phrase that as
    >
    > Anything you write down in more than place,
    > is wrong in more than one place


    That's a little strong. Usually one of the places is correct. Usually
    the problem does not show up immediately. I applaud your efforts
    toward creating an aphorism.

    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    If you tell a computer the same fact in more than one place, unless you have an automated mechanism to ensure they stay in sync, the versions of the fact will eventually get out of sync.
     
    Roedy Green, Mar 27, 2010
    #10
    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. C
    Replies:
    1
    Views:
    851
  2. vertigo

    IP: long-> InetAddress

    vertigo, May 2, 2004, in forum: Java
    Replies:
    2
    Views:
    4,475
    Roedy Green
    May 3, 2004
  3. Madhur Ahuja
    Replies:
    1
    Views:
    770
    Paul Lutus
    Aug 29, 2004
  4. Replies:
    0
    Views:
    4,641
  5. sujit
    Replies:
    1
    Views:
    940
    Arne Vajhøj
    Jan 5, 2011
Loading...

Share This Page