when we call InetAddress.getByName() with a string representing
a DNS name that *only has a AAAA record attached* (e.g. IPv6-only host),
the address endpoint instantiation fails with :
java.net.UnknownHostException: six.stripes.org
at java.net.InetAddress.getAllByName0(InetAddress.java:753)
at java.net.InetAddress.getAllByName0(InetAddress.java:723)
at java.net.InetAddress.getAllByName(InetAddress.java:717)
at java.net.InetAddress.getByName(InetAddress.java:654)
at Cl1.main(Cl1.java:8)
This is using RedHat linux, kernel 2.2.16-3 and Java(TM) 2 Runtime
Environment, Standard Edition (build 1.4.0-beta-b50)
Here is the code:
import java.io.*;
import java.net.*;
public class Cl1 {
public static void main(String[] args) {
try {
InetAddress host = InetAddress.getByName("six.stripes.org");
System.out.println("Got: " + host.toString());
Socket s = new Socket(host, 13);
} catch (Exception e) {
e.printStackTrace();
} //try
} //main()
} //Cl1
I get the same failure if I set the java.net.preferIPv6Addresses property
to true.
I am using a bind-8.2.3 IPv6 enabled DNS server (the same code *works* on
the Solaris/SPARC build); I have also tried putting the quad-a record into
/etc/hosts (not that this *should work in the first place*), still no joy.
All my other (C-based) code, and all the IPv6 applications and servers
installed on the linux box in question work fine (perform correct name
resolution to AAAA records and back again; interact with other IPv6
native services).
The very same Java code works running on a Solaris/SPARC
machine at the same Merlin build 50, on the same IPv6 network with name
resolution and routing set up identically.
Env. Description:
bash$ cat /etc/redhat-release
Red Hat Linux release 6.2 (Zoot)
bash$ uname -a
Linux daffy 2.2.16-3 #7 Thu Sep 7 12:01:27 BST 2000 i686 unknown
bash$ nslookup -query=aaaa six.stripes.org
six.stripes.org IPv6 address = 3ffe:803c:80:200:a00:20ff:feb5:ef1e
stripes.org nameserver = dns0.webcentre.net
stripes.org nameserver = dns1.webcentre.net
dns0.webcentre.net internet address = 62.189.30.1
dns1.webcentre.net internet address = 62.189.30.129
bash$ nslookup -query=a six.stripes.org
*** ns1.ecs.soton.ac.uk can't find six.stripes.org: Non-existent host/domain
bash$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 6
model name : Mobile Pentium II
stepping : 5
cpu MHz : 400.912
cache size : 0 KB
fdiv_bug : no
hlt_bug : no
sep_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr
bogomips : 799.54
bash$ /sbin/ifconfig eth0 | grep inet6
inet6 addr: fe80::250:4ff:fe66:f559/10 Scope:Link
inet6 addr: 3ffe:803c:80:111:250:4ff:fe66:f559/64 Scope:Global
bash$ /usr/sbin/traceroute6 -n six.stripes.org
traceroute to six.stripes.org (3ffe:803c:80:200:a00:20ff:feb5:ef1e) from 3ffe:803c:80:111:250:4ff:fe66:f559, 30 hops max, 16 byte packets
1 3ffe:803c:80:111::1 1.181 ms 1.066 ms 1.057 ms
2 3ffe:803c:80:110::1 1.286 ms 1.194 ms 1.182 ms
3 3ffe:803c:80:100::1 1.67 ms * 1.749 ms
4 3ffe:803c:80:200:a00:20ff:feb5:ef1e 1.984 ms 1.858 ms 1.822 ms
bash$ rpm -q net-tools
net-tools-1.54-4
bash$ telnet six.stripes.org 13
Trying 3ffe:803c:80:200:a00:20ff:feb5:ef1e...
Connected to six.stripes.org.
Escape character is '^]'.
Tue Feb 13 22:49:44 2001
Connection closed by foreign host.
a DNS name that *only has a AAAA record attached* (e.g. IPv6-only host),
the address endpoint instantiation fails with :
java.net.UnknownHostException: six.stripes.org
at java.net.InetAddress.getAllByName0(InetAddress.java:753)
at java.net.InetAddress.getAllByName0(InetAddress.java:723)
at java.net.InetAddress.getAllByName(InetAddress.java:717)
at java.net.InetAddress.getByName(InetAddress.java:654)
at Cl1.main(Cl1.java:8)
This is using RedHat linux, kernel 2.2.16-3 and Java(TM) 2 Runtime
Environment, Standard Edition (build 1.4.0-beta-b50)
Here is the code:
import java.io.*;
import java.net.*;
public class Cl1 {
public static void main(String[] args) {
try {
InetAddress host = InetAddress.getByName("six.stripes.org");
System.out.println("Got: " + host.toString());
Socket s = new Socket(host, 13);
} catch (Exception e) {
e.printStackTrace();
} //try
} //main()
} //Cl1
I get the same failure if I set the java.net.preferIPv6Addresses property
to true.
I am using a bind-8.2.3 IPv6 enabled DNS server (the same code *works* on
the Solaris/SPARC build); I have also tried putting the quad-a record into
/etc/hosts (not that this *should work in the first place*), still no joy.
All my other (C-based) code, and all the IPv6 applications and servers
installed on the linux box in question work fine (perform correct name
resolution to AAAA records and back again; interact with other IPv6
native services).
The very same Java code works running on a Solaris/SPARC
machine at the same Merlin build 50, on the same IPv6 network with name
resolution and routing set up identically.
Env. Description:
bash$ cat /etc/redhat-release
Red Hat Linux release 6.2 (Zoot)
bash$ uname -a
Linux daffy 2.2.16-3 #7 Thu Sep 7 12:01:27 BST 2000 i686 unknown
bash$ nslookup -query=aaaa six.stripes.org
six.stripes.org IPv6 address = 3ffe:803c:80:200:a00:20ff:feb5:ef1e
stripes.org nameserver = dns0.webcentre.net
stripes.org nameserver = dns1.webcentre.net
dns0.webcentre.net internet address = 62.189.30.1
dns1.webcentre.net internet address = 62.189.30.129
bash$ nslookup -query=a six.stripes.org
*** ns1.ecs.soton.ac.uk can't find six.stripes.org: Non-existent host/domain
bash$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 6
model name : Mobile Pentium II
stepping : 5
cpu MHz : 400.912
cache size : 0 KB
fdiv_bug : no
hlt_bug : no
sep_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr
bogomips : 799.54
bash$ /sbin/ifconfig eth0 | grep inet6
inet6 addr: fe80::250:4ff:fe66:f559/10 Scope:Link
inet6 addr: 3ffe:803c:80:111:250:4ff:fe66:f559/64 Scope:Global
bash$ /usr/sbin/traceroute6 -n six.stripes.org
traceroute to six.stripes.org (3ffe:803c:80:200:a00:20ff:feb5:ef1e) from 3ffe:803c:80:111:250:4ff:fe66:f559, 30 hops max, 16 byte packets
1 3ffe:803c:80:111::1 1.181 ms 1.066 ms 1.057 ms
2 3ffe:803c:80:110::1 1.286 ms 1.194 ms 1.182 ms
3 3ffe:803c:80:100::1 1.67 ms * 1.749 ms
4 3ffe:803c:80:200:a00:20ff:feb5:ef1e 1.984 ms 1.858 ms 1.822 ms
bash$ rpm -q net-tools
net-tools-1.54-4
bash$ telnet six.stripes.org 13
Trying 3ffe:803c:80:200:a00:20ff:feb5:ef1e...
Connected to six.stripes.org.
Escape character is '^]'.
Tue Feb 13 22:49:44 2001
Connection closed by foreign host.