Discussion:
java in a high latency network
(too old to reply)
xeon Mailinglist
2014-03-04 18:12:39 UTC
Permalink
I am using a program that transfer files between the hosts. My problem is that the network between these hosts have a high latency (> 1sec), and sometimes my programs launch a error of "java.net.NoRouteToHostException: No route to host; ".

I think this problem happens because of the latency. There is a way to configure the JVM for networks with high latency so that the time to try to connect to a remote host is longer?

Thanks,
Knute Johnson
2014-03-05 03:08:57 UTC
Permalink
Post by xeon Mailinglist
I am using a program that transfer files between the hosts. My
problem is that the network between these hosts have a high latency
(> 1sec), and sometimes my programs launch a error of
"java.net.NoRouteToHostException: No route to host; ".
I think this problem happens because of the latency. There is a way
to configure the JVM for networks with high latency so that the time
to try to connect to a remote host is longer?
Thanks,
I would expect a timeout and a ConnectException not a
NoRouteToHostException with a high latency. The latter implies
something blocking the connection as opposed to not accepting a
connection. Can you create an example that would cause the
NoRouteToHostException with a response delay?
--
Knute Johnson
Roedy Green
2014-03-05 23:57:00 UTC
Permalink
On Tue, 4 Mar 2014 10:12:39 -0800 (PST), xeon Mailinglist
Post by xeon Mailinglist
I think this problem happens because of the latency.
There is a way to configure the JVM for networks with high latency so
that the time to try to connect to a remote host is longer?

I have never seen that error myself, but there are timeouts you can
configure. See http://mindprod.com/products1.html#HTTP for source.
--
Roedy Green Canadian Mind Products http://mindprod.com
The future has already happened, it just isn’t evenly distributed.
~ William Gibson (born: 1948-03-17 age: 65)
EricF
2014-03-07 03:25:34 UTC
Permalink
Post by Roedy Green
On Tue, 4 Mar 2014 10:12:39 -0800 (PST), xeon Mailinglist
Post by xeon Mailinglist
I think this problem happens because of the latency.
There is a way to configure the JVM for networks with high latency so
that the time to try to connect to a remote host is longer?
I have never seen that error myself, but there are timeouts you can
configure. See http://mindprod.com/products1.html#HTTP for source.
Honestly people. How difficult is it to go to a search engine like Google and
try something like "java network timeout" One of the top choices is Oracle's
Java network properties.

Eric

Loading...