Mitra M Mitra M -4 years ago 190
Git Question

Mingw+msys2 : Failed to connect to bitbucket.org : Network is unreachable

I want to build ffmpeg under windows 8.1 by using this script and last version of Mingw+Msys2 , but it gets error for any hg clone from bitbucket.org , e.g:


$ hg clone https://bitbucket.org/multicoreware/x265

abort: error:Network is unreachable


After searching on the Internet I saw this page and realized it is because that bitbucket.org has IPv6 and I can not access to it .
Please see results of the following commands:

$ ping -n 10 bitbucket.org

Pinging bitbucket.org [104.192.143.2] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 104.192.143.2:
Packets: Sent = 10, Received = 0, Lost = 10 (100% loss),



$ ping -n 10 -6 bitbucket.org
Ping request could not find host bitbucket.org. Please check the name and try again


$ tracert bitbucket.org

Tracing route to bitbucket.org [104.192.143.1]
over a maximum of 30 hops:

1 <1 ms <1 ms <1 ms 192.168.1.1
2 30 ms 29 ms 9 ms 81.12.120.2
3 20 ms 40 ms 12 ms 81.12.120.1
4 6 ms 8 ms 10 ms 192.168.8.41
5 21 ms 24 ms 19 ms 192.168.8.1
6 * * * Request timed out.
7 52 ms 56 ms 54 ms 192.168.170.241
8 35 ms 25 ms * 10.10.53.61
9 27 ms 32 ms 32 ms 10.201.47.142
10 30 ms 44 ms 38 ms 10.201.42.117
11 40 ms 33 ms 67 ms 10.201.147.242
12 46 ms 38 ms 59 ms 85.132.90.201
13 * * * Request timed out.
14 * * * Request timed out.
15 * * * Request timed out.
16 * * * Request timed out.
...


NOTE : Also, I've seen some posts on the stackoverflow.com like this. But it seems works only for Linux, Because I added 104.192.143.2 bitbucket.org to my /etc/hosts but not worked.

Please guide me.

Answer Source

This is not an IPv6 issue - you'd have the full [2401:1d80:1010::150] address in your ping -6 if that were the case.

Instead, it looks like you're connecting from Iran (81.12.120.0/24 is owned by an Iranian ISP). Since the US government has imposed sanctions on Iran, and since Bitbucket's infrastructure is in the US, the Bitbucket servers are required to drop requests from Iran.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download