Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (3.4k points)

I got the Error Message:

An error occurs in downloading files from FTP Server :

 ftp://speedtest.tele2.net: invalid IPv6 address

from these lines:

String serverAddress = "ftp://speedtest.tele2.net"; 

FTPClient ftp = new FTPClient(); 

ftp.connect(serverAddress);

I don't have a clue what to do about that?

The only advice I got is about this System Properties, but that didn't solve the problem.

java.net.preferIPv4Stack -> 

true java.net.preferIPv6Addresses -> true

Did anyone get Advice or References? Thank you very much!

1 Answer

0 votes
by (46k points)

The site holds both IPv6 and IPv4 addresses

$ dig AAAA speedtest.tele2.net -> 2a00:800:1010::1

$ dig A speedtest.tele2.net    -> 90.130.70.73

IPv6 is normally preferred if available. But while the server can be reached at the IPv4 address port 21 it cannot be given at the IPv6 address, i.e. an irregular setup of FTP and DNS.

The error message from Java is puzzling as it is not the IPv6 address which is bad but it fails to connect to this address.

Related questions

0 votes
1 answer
asked Aug 2, 2019 in Java by Suresh (3.4k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...