#11452 closed defect (fixed)
IPv6 issue on 82xx and 8339 on Ubuntu 14.04 / ElementaryOS Freya & Luna
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 15.09 |
Component: | Core | Version: | |
Keywords: | template_report ipv6 linux javabug | Cc: |
Description
What steps will reproduce the problem?
- autoremove JOSM. deleted all plugins
- (fresh) install JOSM 8109 from repository
- run josm 8109 from terminal (loads ok. download data ok)
- close josm 8109
- sudo apt-get install josm (upgrad to JOSM 8339)
- run josm 8339 (on terminal)
- got this error: "INFO: Detected useable IPv6 network, prefering IPv6 over IPv4." "WARNING: Failed to read MOTD. Exception was: java.net.SocketException: Network is unreachable"
- JOSM won't download any data from server (tried on 82xx and 83xx)
- autoremove JOSM 8339
- reinstall josm 8109. everything is fine.
Please provide any additional information below. Attach a screenshot if possible.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2015-05-08 01:31:23 Last Changed Author: stoecker Revision: 8339 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2015-05-07 17:30:43 +0200 (Thu, 07 May 2015) Last Changed Rev: 8339 Identification: JOSM/1.5 (8339 en) Linux elementary OS Freya Memory Usage: 175 MB / 875 MB (48 MB allocated, but free) Java version: 1.7.0_79, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u79-2.5.5-0ubuntu0.14.04.2 VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true] Plugins: - DirectDownload - DirectUpload - buildings_tools - fieldpapers - measurement - photo_geotagging - reverter - turnrestrictions - utilsplugin2 Last errors/warnings: - W: Failed to read MOTD. Exception was: java.net.SocketException: Network is unreachable - E: java.net.SocketException: Network is unreachable - E: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketException: Network is unreachable
Attachments (3)
Change History (30)
by , 10 years ago
Attachment: | update_JOSM_8109_to_8339.png added |
---|
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:2 by , 10 years ago
Resolution: | → needinfo |
---|---|
Status: | needinfo → closed |
comment:3 by , 10 years ago
Please reopen this issue.
Faced with the same confusing issue.
console output:
Using /usr/lib/jvm/java-8-oracle/bin/java to execute josm. INFO: Detected useable IPv6 network, prefering IPv6 over IPv4. WARNING: Failed to read MOTD. Exception was: java.net.SocketException: Network is unreachable INFO: GET https://api.openstreetmap.org/api/capabilities... WARNING: java.net.SocketException: Network is unreachable ERROR: java.net.SocketException: Network is unreachable INFO: Message notifier active (checks every 5 minutes) INFO: GET https://api.openstreetmap.org/api/capabilities... WARNING: Already here java.net.SocketException: Network is unreachable WARNING: org.openstreetmap.josm.io.OsmApiInitializationException: org.openstreetmap.josm.io.OsmTransferException: java.net.SocketException: Network is unreachable. Cause: org.openstreetmap.josm.io.OsmTransferException: java.net.SocketException: Network is unreachable. Cause: java.net.SocketException: Network is unreachable org.openstreetmap.josm.io.OsmApiInitializationException: org.openstreetmap.josm.io.OsmTransferException: java.net.SocketException: Network is unreachable at org.openstreetmap.josm.io.OsmApi.initialize(OsmApi.java:269) at org.openstreetmap.josm.io.OsmApi.initialize(OsmApi.java:195) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:66) at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:172) at org.openstreetmap.josm.io.MessageNotifier$Worker.run(MessageNotifier.java:61) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.openstreetmap.josm.io.OsmTransferException: java.net.SocketException: Network is unreachable at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:727) at org.openstreetmap.josm.io.OsmApi$CapabilitiesCache.updateData(OsmApi.java:183) at org.openstreetmap.josm.io.CacheCustomContent.updateForce(CacheCustomContent.java:134) at org.openstreetmap.josm.io.CacheCustomContent.updateForceString(CacheCustomContent.java:146) at org.openstreetmap.josm.io.CacheCustomContent.updateIfRequiredString(CacheCustomContent.java:124) at org.openstreetmap.josm.io.OsmApi.initialize(OsmApi.java:213) ... 11 more Caused by: java.net.SocketException: Network is unreachable at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:656) at sun.net.NetworkClient.doConnect(NetworkClient.java:175) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:657) ... 16 more
version:
~$ josm --version Using /usr/lib/jvm/java-8-oracle/bin/java to execute josm. JOSM/1.5 (8491 en) Linux Ubuntu 14.04.2 LTS
network config:
~$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 00:1c:c4:cf:6b:4a brd ff:ff:ff:ff:ff:ff 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:1f:3c:07:39:f9 brd ff:ff:ff:ff:ff:ff inet 192.168.1.157/24 brd 192.168.1.255 scope global wlan0 valid_lft forever preferred_lft forever inet6 fe80::21f:3cff:fe07:39f9/64 scope link valid_lft forever preferred_lft forever
Have no proper IPv6 setup and it does't work.
Self-healing does't work transparently
comment:4 by , 10 years ago
I disable IPv6 by bollowed way:
Add to file /etc/sysctl.conf lines:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
Activate it by sudo sysctl -p
After that I check cat /proc/sys/net/ipv6/conf/all/disable_ipv6
That return 1
(IPv6 disabled)
After that JOSM issue is gone
~$ josm Using /usr/lib/jvm/java-8-oracle/bin/java to execute josm. INFO: Detected no useable IPv6 network, prefering IPv4 over IPv6 after next restart. INFO: GET https://api.openstreetmap.org/api/capabilities... INFO: OK INFO: Message notifier active (checks every 5 minutes) INFO: GET https://api.openstreetmap.org/api/0.6/user/details (get number of unread messages)
comment:5 by , 10 years ago
This ticket was closed as NEEDINFO, which means it's not fixed, but information was missing!
Text says: "INFO: Detected useable IPv6 network, prefering IPv6 over IPv4."
This text is caused by this code (stripped).
for (InetAddress a : InetAddress.getAllByName("josm.openstreetmap.de")) { if (a instanceof Inet6Address) { if (a.isReachable(1000)) { Main.info(tr("Detected useable IPv6 network, prefering IPv6 over IPv4.")); } } }
This means that only if resolving IPv6 address of josm.openstreetmap.de works and it's possible to connect that server the message appears.
If that messages appears on your system without IPv6 functionality, then something needs to intercept and act as if connection was ok. Please answer following:
- What does
host t josm.openstreetmap.de
- What says
host -t AAAA josm.openstreetmap.de
- What says
ping6 -c 3 josm.openstreetmap.de
- What says
ping -c 3 josm.openstreetmap.de
- What says
ping6 -c 3 ::1
All of the above with your fix reversed.
P.S. You can set "prefer.ipv6" to false in JOSM. No need to change system settings (thought that probably also fixes other issues non-fatal you may have :-)
If you know how to program Java a bit using the above code snipped and printing the values in each stage would be helpful as well.
comment:6 by , 10 years ago
I revert all changes above and perform commands
~$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 00:1c:c4:cf:6b:4a brd ff:ff:ff:ff:ff:ff 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:1f:3c:07:39:f9 brd ff:ff:ff:ff:ff:ff inet 192.168.1.157/24 brd 192.168.1.255 scope global wlan0 valid_lft forever preferred_lft forever inet6 fe80::21f:3cff:fe07:39f9/64 scope link valid_lft forever preferred_lft forever
~$ host t josm.openstreetmap.de ;; connection timed out; no servers could be reached
~$ host -t AAAA josm.openstreetmap.de josm.openstreetmap.de has IPv6 address 2a01:4f8:d16:5ac6::2 ddarwish@dark-hp:~$ ping6 -c 3 josm.openstreetmap.de PING josm.openstreetmap.de(josm.openstreetmap.de) 56 data bytes From josm.openstreetmap.de icmp_seq=1 Destination unreachable: No route From josm.openstreetmap.de icmp_seq=2 Destination unreachable: No route From josm.openstreetmap.de icmp_seq=3 Destination unreachable: No route --- josm.openstreetmap.de ping statistics --- 3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2002ms
~$ ping -c 3 josm.openstreetmap.de PING josm.openstreetmap.de (78.47.79.181) 56(84) bytes of data. 64 bytes from josm.openstreetmap.de (78.47.79.181): icmp_seq=1 ttl=55 time=48.2 ms 64 bytes from josm.openstreetmap.de (78.47.79.181): icmp_seq=2 ttl=55 time=48.0 ms 64 bytes from josm.openstreetmap.de (78.47.79.181): icmp_seq=3 ttl=55 time=48.1 ms --- josm.openstreetmap.de ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 48.090/48.161/48.213/0.051 ms
~$ ping6 -c 3 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.032 ms 64 bytes from ::1: icmp_seq=2 ttl=64 time=0.041 ms 64 bytes from ::1: icmp_seq=3 ttl=64 time=0.038 ms --- ::1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.032/0.037/0.041/0.003 ms
Thanks for advice. I'll set "prefer.ipv6" to false.
I'm not a Java programmer (
follow-up: 9 comment:7 by , 10 years ago
Resolution: | needinfo |
---|---|
Status: | closed → reopened |
Hmm, looks all ok to me (note one of my commands had an additional "t", but that's not important :-) You have a working IPv4 and local network only IPv6. Question is why Java thinks otherwise.
Can you please download IPv6Test.class and start it with java IPv6Test
and tell me the output?
follow-up: 11 comment:8 by , 10 years ago
I'm not affected by the problem, but I try to run your test just for fun. The result looks not good:
michael@michael-CQ2710EZ:~/Downloads$ java IPv6Test Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file IPv6Test at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
I actually use this JOSM version:
Revision: 8607 Repository Root: http://josm.openstreetmap.de/svn Relative URL: ^/trunk Last Changed Author: wiktorn Last Changed Date: 2015-07-16 21:55:32 +0200 (Thu, 16 Jul 2015) Build-Date: 2015-07-17 01:32:09 URL: http://josm.openstreetmap.de/svn/trunk Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last Changed Rev: 8607 Identification: JOSM/1.5 (8607 en) Linux Ubuntu 15.04 Memory Usage: 235 MB / 878 MB (70 MB allocated, but free) Java version: 1.8.0_45-internal, Oracle Corporation, OpenJDK Server VM VM arguments: [-javaagent:/usr/share/java/jayatanaag.jar, -Djosm.restart=true, -Djosm.home=/home/michael/.josm-latest, -Djava.net.useSystemProxies=true] Plugins: - ColumbusCSV (31241) - FastDraw (31265) - HouseNumberTaggingTool (31241) - OpeningHoursEditor (31241) - RoadSigns (31241) - SimplifyArea (31241) - buildings_tools (31361) - contourmerge (1013) - imagery-xml-bounds (31241) - imagery_offset_db (31241) - pbf (31241) - poly (31241) - public_transport (31241) - reltoolbox (31241) - reverter (31241) - terracer (31241) - turnrestrictions (31241) - utilsplugin2 (31241)
follow-up: 10 comment:9 by , 10 years ago
I done it
$ java IPv6Test Test josm.openstreetmap.de/78.47.79.181 Test josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 IPV6 ok josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:
comment:10 by , 10 years ago
Replying to darwish.d.d@…:
I done it
$ java IPv6Test Test josm.openstreetmap.de/78.47.79.181 Test josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 IPV6 ok josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:
Fine, but no news - This only tells us what we already know, that Java is sure IPv6 is working. (I assume you forgot to C&P the last three characters?)
Can you please try following:
- Login as superuser/root
- Try not to cause network traffic somewhere else on the computer
- Call following commandline (as root)
(tcpdump -v -n -i wlan0 &) ; sleep 1; java IPv6Test; sleep 1; killall tcpdump
- This calls network sniffer tcpdump in background, then the testcase and then kills the sniffer.
- If nothing is printed, then check if wlan0 is correct or another interface is used.
- If too much non-related stuff is printed wait until these tasks are finished and try again.
- Maybe you need to install tcpdump temporary to do so. Don't know if that's default.
You should get something like this (note this is an example of working IPv6 connection):
tcpdump: listening on p3p1, link-type EN10MB (Ethernet), capture size 65535 bytes Test josm.openstreetmap.de/78.47.79.181 Test josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 17:13:09.011017 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) ... > 2a01:4f8:d16:5ac6::2: [icmp6 sum ok] ICMP6, echo request, seq 1 17:13:09.053632 IP6 (hlim 52, next-header ICMPv6 (58) payload length: 24) 2a01:4f8:d16:5ac6::2 > ...: [icmp6 sum ok] ICMP6, echo reply, seq 1 IPV6 ok josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 2 packets captured 2 packets received by filter 0 packets dropped by kernel
comment:11 by , 10 years ago
Replying to mdk:
I'm not affected by the problem, but I try to run your test just for fun. The result looks not good:
Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file IPv6Test
That looks much like a download error. Try a tool which for sure does not modify file contents, e.g. wget.
comment:12 by , 10 years ago
$ (sudo tcpdump -v -n -i wlan0 &); sleep 2; java IPv6Test; sleep 2; sudo killall tcpdump tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 65535 bytes 09:32:39.596769 IP (tos 0x0, ttl 84, id 33244, offset 0, flags [DF], proto TCP (6), length 538) 31.13.93.3.443 > 192.168.1.157.54817: Flags [P.], cksum 0xbfaf (correct), seq 974107396:974107882, ack 1157649325, win 1529, options [nop,nop,TS val 993514267 ecr 247054], length 486 09:32:39.596810 IP (tos 0x0, ttl 64, id 36103, offset 0, flags [DF], proto TCP (6), length 52) 192.168.1.157.54817 > 31.13.93.3.443: Flags [.], cksum 0xff2c (correct), ack 486, win 1441, options [nop,nop,TS val 247231 ecr 993514267], length 0 09:32:39.604539 IP (tos 0x0, ttl 64, id 36104, offset 0, flags [DF], proto TCP (6), length 502) 192.168.1.157.54817 > 31.13.93.3.443: Flags [P.], cksum 0x4342 (correct), seq 1:451, ack 486, win 1444, options [nop,nop,TS val 247232 ecr 993514267], length 450 09:32:39.652363 IP (tos 0x0, ttl 84, id 33245, offset 0, flags [DF], proto TCP (6), length 97) 31.13.93.3.443 > 192.168.1.157.54817: Flags [P.], cksum 0x87fc (correct), seq 486:531, ack 451, win 1540, options [nop,nop,TS val 993514323 ecr 247232], length 45 09:32:39.688645 IP (tos 0x0, ttl 64, id 36105, offset 0, flags [DF], proto TCP (6), length 52) 192.168.1.157.54817 > 31.13.93.3.443: Flags [.], cksum 0xfceb (correct), ack 531, win 1444, options [nop,nop,TS val 247254 ecr 993514323], length 0 09:32:40.444475 IP (tos 0x0, ttl 48, id 64475, offset 0, flags [none], proto UDP (17), length 68) 64.233.162.189.443 > 192.168.1.157.41370: UDP, length 40 09:32:40.470648 IP (tos 0x0, ttl 64, id 12472, offset 0, flags [DF], proto UDP (17), length 68) 192.168.1.157.41370 > 64.233.162.189.443: UDP, length 40 09:32:41.206749 IP (tos 0x0, ttl 48, id 23813, offset 0, flags [none], proto UDP (17), length 68) 74.125.205.189.443 > 192.168.1.157.58753: UDP, length 40 09:32:41.233707 IP (tos 0x0, ttl 64, id 46694, offset 0, flags [DF], proto UDP (17), length 68) 192.168.1.157.58753 > 74.125.205.189.443: UDP, length 40 Test josm.openstreetmap.de/78.47.79.181 Test josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 IPV6 ok josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 09:32:41.585406 IP (tos 0x0, ttl 64, id 42278, offset 0, flags [DF], proto UDP (17), length 67) 192.168.1.157.29359 > 192.168.1.205.53: 38853+ A? josm.openstreetmap.de. (39) 09:32:41.585475 IP (tos 0x0, ttl 64, id 42279, offset 0, flags [DF], proto UDP (17), length 67) 192.168.1.157.1843 > 192.168.1.205.53: 19757+ AAAA? josm.openstreetmap.de. (39) 09:32:41.586972 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 83) 192.168.1.205.53 > 192.168.1.157.29359: 38853 1/0/0 josm.openstreetmap.de. A 78.47.79.181 (55) 09:32:41.587252 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 95) 192.168.1.205.53 > 192.168.1.157.1843: 19757 1/0/0 josm.openstreetmap.de. AAAA 2a01:4f8:d16:5ac6::2 (67) 09:32:41.588365 IP (tos 0x0, ttl 64, id 42280, offset 0, flags [DF], proto UDP (17), length 62) 192.168.1.157.17009 > 192.168.1.205.53: 645+ A? daisy.ubuntu.com. (34) 09:32:41.588418 IP (tos 0x0, ttl 64, id 42281, offset 0, flags [DF], proto UDP (17), length 62) 192.168.1.157.61828 > 192.168.1.205.53: 14167+ AAAA? daisy.ubuntu.com. (34) 09:32:41.589587 IP6 (hlim 64, next-header TCP (6) payload length: 40) fe80::21f:3cff:fe07:39f9.48317 > 2a01:4f8:d16:5ac6::2.7: Flags [S], cksum 0xa3e6 (correct), seq 1440435425, win 28800, options [mss 1440,sackOK,TS val 247729 ecr 0,nop,wscale 7], length 0 09:32:41.590923 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 94) 192.168.1.205.53 > 192.168.1.157.17009: 645 2/0/0 daisy.ubuntu.com. A 91.189.92.57, daisy.ubuntu.com. A 91.189.92.55 (66) 09:32:41.592146 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::6670:2ff:fea0:b868 > ff02::1:ff07:39f9: [icmp6 sum ok] ICMP6, neighbor solicitation, length 32, who has fe80::21f:3cff:fe07:39f9 source link-address option (1), length 8 (1): 64:70:02:a0:b8:68 09:32:41.592185 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::21f:3cff:fe07:39f9 > fe80::6670:2ff:fea0:b868: [icmp6 sum ok] ICMP6, neighbor advertisement, length 32, tgt is fe80::21f:3cff:fe07:39f9, Flags [solicited, override] destination link-address option (2), length 8 (1): 00:1f:3c:07:39:f9 09:32:41.592273 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 123) 192.168.1.205.53 > 192.168.1.157.61828: 14167 0/1/0 (95) 09:32:41.593000 IP6 (hlim 64, next-header ICMPv6 (58) payload length: 88) fe80::6670:2ff:fea0:b868 > fe80::21f:3cff:fe07:39f9: [icmp6 sum ok] ICMP6, destination unreachable, unreachable route 2a01:4f8:d16:5ac6::2 09:32:42.590189 IP (tos 0x0, ttl 64, id 42282, offset 0, flags [DF], proto UDP (17), length 62) 192.168.1.157.38686 > 192.168.1.205.53: 20836+ A? daisy.ubuntu.com. (34) 09:32:42.590266 IP (tos 0x0, ttl 64, id 42283, offset 0, flags [DF], proto UDP (17), length 62) 192.168.1.157.19827 > 192.168.1.205.53: 59452+ AAAA? daisy.ubuntu.com. (34) 09:32:42.591558 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 94) 192.168.1.205.53 > 192.168.1.157.38686: 20836 2/0/0 daisy.ubuntu.com. A 91.189.92.55, daisy.ubuntu.com. A 91.189.92.57 (66) 09:32:42.591835 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 62) 192.168.1.205.53 > 192.168.1.157.19827: 59452 0/0/0 (34) 09:32:42.704750 IP (tos 0x0, ttl 57, id 57278, offset 0, flags [DF], proto TCP (6), length 289) 95.213.4.211.80 > 192.168.1.157.52131: Flags [P.], cksum 0xe0ba (correct), seq 3809718208:3809718445, ack 4023014772, win 2534, options [nop,nop,TS val 1768449266 ecr 241755], length 237 09:32:42.704789 IP (tos 0x0, ttl 64, id 25063, offset 0, flags [DF], proto TCP (6), length 52) 192.168.1.157.52131 > 95.213.4.211.80: Flags [.], cksum 0x0f47 (correct), ack 237, win 1134, options [nop,nop,TS val 248008 ecr 1768449266], length 0 27 packets captured 27 packets received by filter 0 packets dropped by kernel
comment:14 by , 10 years ago
Sorry for the long delay.
Issue is that Java says connection is ok when in reality it is "ICMP6, destination unreachable, unreachable route". Seems I can't trust the Java functions. I need to implement my own test to be sure connection works really.
comment:16 by , 10 years ago
Keywords: | ipv6 linux javabug added |
---|---|
Milestone: | → 15.09 |
comment:18 by , 10 years ago
Yes :) I don't remember everyting on this ticket. If I understand well, your program should print "IPV6 ok " on a ipv6 enabled machine and it doesn't, right? Have you tried with latest Java (8u65/8u66) before I create the ticket? I will also need your system information (uname -a).
comment:19 by , 10 years ago
I cannot test on my machine because my ISP does not provide IPv6 yet. I tried on JOSM server and it works, but I'm not sure if the loopback is used or not:
josm@josm:~$ java -cp . IPv6Test Test josm.openstreetmap.de/78.47.79.181 Test josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 IPV6 ok josm.openstreetmap.de/2a01:4f8:d16:5ac6:0:0:0:2 josm@josm:~$ uname -a Linux josm.openstreetmap.de 3.13.0-53-generic #89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux josm@josm:~$ java -version java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
comment:20 by , 10 years ago
Problem is reversed. It prints "IPV6 ok" in case it gets an "ICMP6, destination unreachable, unreachable route". Maybe they accept any ICMP6 as ok and not only the proper Echo Reply. I'm currently trying to find a description how that can be reached by an otherwise working IPv6 connection, to make testing easier.
comment:21 by , 10 years ago
OK I have looked into further.
In your test example you should display the scope id as returned by Inet6Address#getScopeId()
because it is involved in the algorithm.
The source code of Inet6AddressImpl#isReachable
is here. In our case it is called with arguments ip, 1000, null, 0
, so we're going to call the native method isReachable0
with arguments ip.getAddress(), scope, 1000, null, 0, -1
.
The Unix implementation is here. It first calls ping6
if a Raw socket can be created, otherwise it tries to open a TCP connection on Echo
port (7
). If the connection is successful it returns true
. The ping6
implementation is here. It sends a ICMP6_ECHO_REQUEST
and expects only a ICMP6_ECHO_REPLY
with the expected id. It also checks for address equality, I don't see anything obviously suspicious here. Maybe you do? I don't understand how it can succeed if it receives Destination Unreachable
.
The Windows implementation is here. It just calls ping6
. The ping6
implementation is here. The Windows implementation of ping6
is simpler: it only checks that a call to Icmp6SendEcho2 returns a value != 0.
Considering that Unix implementation defines its own ping6
mechanism, Windows implementation calls the operating system, and we have received only Linux bug reports, ping6
is definitely incriminated but I don't see how yet.
comment:22 by , 10 years ago
Hah - now I killed my IPv6 totally - probably I even need to reboot which would kill an uptime of 65 days :-( But I was yet unable to create an unreachable route request.
comment:23 by , 10 years ago
For me it tries TCP, so I assume the raw socket needs admin rights. We can probably assume that is the same for all reporters.
I think line 838 looks suspicious to me. ECONNREFUSED leads to an true. Probably that also covers the unreachable destination.
comment:24 by , 8 years ago
ping (haha)
Things changed a bit on my side in the past 20 months, I finally have an IPv6 connection.
I will try it when I return home next week and create a bug report (and update JavaBugs) if I am able to reproduce.
comment:25 by , 8 years ago
Ah, this is interesting. IPv6 support should finally improve in Java 10.
comment:26 by , 8 years ago
I finally have an IPv6 connection.
Welcome in the club ;-)
IPv6 support should finally improve in Java 10.
Let's hope. It really gets time. Java IPv6 support is awful.
comment:27 by , 7 years ago
javabug:8179037 not modified for a whole year. It's not in Java 10, nor in 11, not planned yet :(
Please describe your system and the steps you did. The message above should only ever appear for the second start of new JOSM version. Also it should also only appear when you have a working IPv6 network.
So:
BTW: This should be self-healing - i.e. when it fails it should switch back to IPv4. Does this work?