Trying to download a file from a ftp server (


In my tests, I’m trying to download files from a FTP server. To be precise it is

but I keep getting this error

REvalError: Error in function (type, msg, asError = TRUE) : Failed to connect to port 21: No route to host

I have already tried to create a VPN connection as in

but it didn’t work… Have someone experienced a similiar issue?

No route to host means a network problem. Unless your network/server was down at the time of the build or does some very strange traffic filtering for Travis IPs (sends ICMP destination unreachable instead of the standard RST or dropping packets), it’s a problem on Travis’ side or somewhere in between.

I can connect to now. Does the problem still happen? Can you traceroute any of Travis’ IPs from that server?

1 Like

I don’t know exactly how to traceroute from the server as I’m not the server administrator. But I added a traceroute line to the before install script and it gave me this:

traceroute to (, 30 hops max, 60 byte packets
1 ( 2.054 ms 2.032 ms ( 1.505 ms
2 ( 12.718 ms ( 13.079 ms 11.401 ms
3 ( 12.431 ms ( 11.600 ms ( 17.838 ms
4 * * *
5 * * *
6 * * *
7 * * *
8 ( 147.878 ms 154.917 ms 155.964 ms
9 ( 155.967 ms 146.954 ms 146.066 ms
10 * * *
11 * * ( 337.137 ms !H

I think the !H means that the ftp server is unreachable from Travis IPs as you pointed out.

FTP traffic is unreliable from Travis CI build workers due to our use of NAT servers. (More details here:

If you’re having troubles setting up VPN, I suggest you consider how badly you need this FTP server.

Do you really need this network connection to complete the tests? More external dependencies such as third-party packages and network connexions make your tests inherently more fragile. These should be kept to a minimum.

What from do you need? Do you need data? Or do you want to test the network connectivity? If it is just data and the up-to-date data are not required, I suggest downloading the data to your machine and adding it to the repository.

1 Like

I’m going to redesign the test structure, thank you for the advice!

The traceroute says that this host sends ICMP host unreachable. By the IP, this seems like some router in the same network as your server. You should contact the network administrator for that network so they diagnose the problem.

The problems that @BanzaiMan referred to is that control and data connections may come from different IPs – which violates a security check that many FTP servers make by default. This typically doesn’t manifest itself like this, but you never know…

In any case, @BanzaiMan’s advice applies as well.