-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
6
-
x86
-
windows
JCK : JCK6.0 b15a
J2SE : FAIL - mustang b67
Platform[s] : FAIL - WinVista
switch/Mode : FAIL - default
javasoft.sqe.tests.api.java.net.InetAddress.isReachableTests fails on Windows Vista. The possible reason is:
host "localhost" is reachable by InetAddress.isReachable(timeout), but unreachable via all particular network adapters. The following example:
/* Start of code */
import java.net.*;
import java.io.*;
import java.util.*;
public class net4{
private static int HUGE_TIMEOUT = 60000;
static{
int errors = 0;
int passes = 0;
InetAddress ia = null;
try {
ia = InetAddress.getByName("localhost");
if (!ia.isReachable(HUGE_TIMEOUT))
System.out.println("Generally unreachable");else
System.out.println("Generally reachable");
java.util.Enumeration ifs = null;
ifs = NetworkInterface.getNetworkInterfaces();
int ttl = 10; // 10 hops is quite away
for (; ifs.hasMoreElements(); ) {
NetworkInterface netif = (NetworkInterface)ifs.nextElement();
if (!ia.isReachable(netif, ttl, HUGE_TIMEOUT)) {
System.out.print("Testing host " + ia);
System.out.println("! Unreachable via interface " + netif + "(ttl="+ ttl + ").");
errors++;
} else {
System.out.println("Reachable via interface " + netif + "(ttl="+ ttl + ").");
passes++;
}
}
if ( errors > 0 )
System.out.println(errors + " errors during the test.");
if (passes>0)System.out.println("OKAY");else System.out.println("Unreachable.");
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
}
System.exit(0);
}
}
/* End of code */
tries to analyse is the "localhost" reachable and is it reachable via all accessible network adapters. It results on Vista:
/* Start of output */
Generally reachable
Testing host localhost/127.0.0.1! Unreachable via interface name:eth0 (Teredo Tunneling Pseudo-Interface) index: 4 addresses:
/fe80:0:0:0:0:3210:aefc:61bb%4;
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net0 (WAN Miniport (L2TP)) index: 5 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:eth1 (WAN Miniport (IP)) index: 6 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:ppp0 (WAN Miniport (PPPOE)) index: 7 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:ppp1 (WAN Miniport (PPTP)) index: 8 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net1 (Direct Parallel) index: 9 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:eth2 (NVIDIA nForce Networking Controller) index: 10 addresses:
/fe80:0:0:0:211:d8ff:fe69:4338%10;
/129.159.124.235;
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:ppp2 (RAS Async Adapter) index: 11 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net2 (Microsoft 6to4 Adapter) index: 12 addresses:
/2002:819f:7ceb:0:0:0:819f:7ceb;
/fe80:0:0:0:0:0:819f:7ceb%12;
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net3 (isatap.) index: 13 addresses:
/fe80:0:0:0:0:5efe:0:0%13;
(ttl=10).
10 errors during the test.
Unreachable.
/* end of output */
So the host "localhost" is reachable, but no network interfaces can reach it. The test supposes _every_ network interface can reach "localhost"
.jtr is attached.
J2SE : FAIL - mustang b67
Platform[s] : FAIL - WinVista
switch/Mode : FAIL - default
javasoft.sqe.tests.api.java.net.InetAddress.isReachableTests fails on Windows Vista. The possible reason is:
host "localhost" is reachable by InetAddress.isReachable(timeout), but unreachable via all particular network adapters. The following example:
/* Start of code */
import java.net.*;
import java.io.*;
import java.util.*;
public class net4{
private static int HUGE_TIMEOUT = 60000;
static{
int errors = 0;
int passes = 0;
InetAddress ia = null;
try {
ia = InetAddress.getByName("localhost");
if (!ia.isReachable(HUGE_TIMEOUT))
System.out.println("Generally unreachable");else
System.out.println("Generally reachable");
java.util.Enumeration ifs = null;
ifs = NetworkInterface.getNetworkInterfaces();
int ttl = 10; // 10 hops is quite away
for (; ifs.hasMoreElements(); ) {
NetworkInterface netif = (NetworkInterface)ifs.nextElement();
if (!ia.isReachable(netif, ttl, HUGE_TIMEOUT)) {
System.out.print("Testing host " + ia);
System.out.println("! Unreachable via interface " + netif + "(ttl="+ ttl + ").");
errors++;
} else {
System.out.println("Reachable via interface " + netif + "(ttl="+ ttl + ").");
passes++;
}
}
if ( errors > 0 )
System.out.println(errors + " errors during the test.");
if (passes>0)System.out.println("OKAY");else System.out.println("Unreachable.");
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
}
System.exit(0);
}
}
/* End of code */
tries to analyse is the "localhost" reachable and is it reachable via all accessible network adapters. It results on Vista:
/* Start of output */
Generally reachable
Testing host localhost/127.0.0.1! Unreachable via interface name:eth0 (Teredo Tunneling Pseudo-Interface) index: 4 addresses:
/fe80:0:0:0:0:3210:aefc:61bb%4;
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net0 (WAN Miniport (L2TP)) index: 5 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:eth1 (WAN Miniport (IP)) index: 6 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:ppp0 (WAN Miniport (PPPOE)) index: 7 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:ppp1 (WAN Miniport (PPTP)) index: 8 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net1 (Direct Parallel) index: 9 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:eth2 (NVIDIA nForce Networking Controller) index: 10 addresses:
/fe80:0:0:0:211:d8ff:fe69:4338%10;
/129.159.124.235;
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:ppp2 (RAS Async Adapter) index: 11 addresses:
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net2 (Microsoft 6to4 Adapter) index: 12 addresses:
/2002:819f:7ceb:0:0:0:819f:7ceb;
/fe80:0:0:0:0:0:819f:7ceb%12;
(ttl=10).
Testing host localhost/127.0.0.1! Unreachable via interface name:net3 (isatap.) index: 13 addresses:
/fe80:0:0:0:0:5efe:0:0%13;
(ttl=10).
10 errors during the test.
Unreachable.
/* end of output */
So the host "localhost" is reachable, but no network interfaces can reach it. The test supposes _every_ network interface can reach "localhost"
.jtr is attached.
- duplicates
-
JDK-6379550 Windows Vista support
- Closed
- relates to
-
JDK-6404473 VISTA: MulticastSocket.setInterface fails to set Interface (ipv4)
- Closed