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 ftp.bmf.com.br now. Does the problem still happen? Can you traceroute any of Travis’ IPs from that server?
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 ftp.bmf.com.br (177.54.222.80), 30 hops max, 60 byte packets
1 production-1-nat-c-1-g3fp.c.eco-emissary-99515.internal (10.10.0.6) 2.054 ms 2.032 ms production-1-nat-a-2-xfnr.c.eco-emissary-99515.internal (10.10.0.5) 1.505 ms
2 72.14.233.11 (72.14.233.11) 12.718 ms 209.85.250.34 (209.85.250.34) 13.079 ms 11.401 ms
3 108.170.244.7 (108.170.244.7) 12.431 ms 108.170.243.172 (108.170.243.172) 11.600 ms 108.170.244.5 (108.170.244.5) 17.838 ms
4 * * *
5 * * *
6 * * *
7 * * *
8 122.22.125.189.static.impsat.net.br (189.125.22.122) 147.878 ms 154.917 ms 155.964 ms
9 177.54.222.80 (177.54.222.80) 155.967 ms 146.954 ms 146.066 ms
10 * * *
11 * * 177.54.222.5 (177.54.222.5) 337.137 ms !H
I think the !H means that the ftp server is unreachable from Travis IPs as you pointed out.
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 ftp://ftp.bmf.com.br/MarketData 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.
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…