InetAddress.isReachable

R

Roedy Green

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

Roedy Green

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

Arne Vajhøj

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
 
R

Roedy Green

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

Arne Vajhøj


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
 
E

EJP

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

David Zimmerman

Roedy said:
> 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
 
R

Roedy Green

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.
 

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

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top