Opened 3 years ago

Last modified 3 years ago

#15326 new enhancement

Increase timeout when testing IPv6 connectivity

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: ipv6 timeout Cc: stoecker


Could we have a higher timeout value in

1 second seems to be too low (sometimes it fails too much here to detect a valid IPv6 connection, even when I am sure that everything is OK)

I am doing some tests with 15000 without any visible startup slowdown.
Of course JOSM could/should use a lower value (3000 maybe?)


Build-Date:2017-09-19 10:31:24

Identification: JOSM/1.5 (12876 SVN en) Linux Debian GNU/Linux testing (buster)
Memory Usage: 839 MB / 6372 MB (482 MB allocated, but free)
Java version: 1.8.0_144-8u144-b01-1-b01, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-8-jre:amd64-8u144-b01-1
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Program arguments: [--language=en]

Attachments (0)

Change History (6)

comment:1 Changed 3 years ago by Don-vip

Cc: stoecker added
Keywords: ipv6 timeout added

comment:2 Changed 3 years ago by stoecker

Actually I'd prefer a proper solution instead of adapting the hack. Otherwise I have no objections.

comment:3 Changed 3 years ago by naoliv

I found people with the same problem, like in,, etc says:

"A typical implementation will use ICMP ECHO REQUESTs if the privilege can be obtained, otherwise it will try to establish a TCP connection on port 7 (Echo) of the destination host"

I guess that it needs a privileged account to use ICMP and then falls back to a TCP connection on port 7.
Instead using isReachable() + an additional connection test (SSLSocketFactory.getDefault().createSocket(a, 443).close();), doesn't it make sense to directly test with only the second part? (so we will have only one connection test, to using IPv6)

comment:4 Changed 3 years ago by stoecker

See #11452. Actually isReachable() should be enough, but it does not work (at least for Linux).

I'm not sure if dropping the correct test in favour of the workaround is really the best solution, but probably you're right ;-)

comment:5 Changed 3 years ago by stoecker

P.S. To more clear: isReachable() fails in the wrong direction on Linux: It reports valid IPv6 connections in cases where they don't work. The other way round would be ok with the current design to use Ipv4 when in doubt.

P.S. You can set advanced preference "prefer.ipv6" to "true" to disable the check when you are sure IPv6 works (and you don't switch to IPv4 only networks).

comment:6 Changed 3 years ago by Don-vip

@naoliv: see also previous discussion. The proper solution would be to wait for javabug:8179037 but I have no idea how long it could take.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to naoliv
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.