Issue #12184 on hold

Failed to connect to bitbucket.org port 443

yogendra singh
created an issue

Hi,

I am trying to take clone with a bitbucket repo and getting the following error

fatal: unable to access 'https://yogendra_huulke@bitbucket.org/myusername/six_sym.git/': Failed to connect to bitbucket.org port 443: Network is unreachable

any help will be appreciated.

Official response

  • Jim Redmond staff

    "Failed to connect" errors could be anything from DNS issues to firewall configurations to local network problems to ISPs that are incompletely routing Bitbucket traffic to national network filters. Unfortunately, there isn't enough detail in any of these comments to diagnose the exact problems, which may or may not be related to each other.

    If you experience this, and you can't find any obvious problems with your own network configuration, please do not comment here but instead open a support ticket with the results of the following commands:

    For OS X, Linux, and other UNIX-based operating systems:

    For Windows:

    • ping -n 10 bitbucket.org
    • ping -n 10 -6 bitbucket.org
    • tracert bitbucket.org
    • tracert -6 bitbucket.org

    (To clarify: "ping6" and "traceroute6" are the IPv6 equivalents of "ping" and "traceroute", respectively, and "GIT_CURL_VERBOSE=1" before any git command will detail all the HTTP-specific parts of the connection. On the Windows side of things, the "-6" in the command line specifies that your computer should use IPv6 for the ping or tracert.)

    Additionally, if you suspect that your problem is related to Bitbucket's IPv6 support, then you should be able to test your overall IPv6 connectivity by opening the following links in your browser:

    Those links should not work at all if your IPv6 connection is disabled or misconfigured. If that's the case, as a temporary workaround (note the heavy emphasis on the word "temporary"!), you can add "104.192.143.3 bitbucket.org" to your hostfile while you work with your network administrators and/or ISP to fix IPv6 access on that system.

    Again: please do not comment here.

Comments (85)

  1. Jim Redmond staff

    Unfortunately, the screenshot isn't working for me. Can you copy/paste the full output? Also, "network is unreachable" implies that something is preventing access; can you ping bitbucket.org from the affected system?

  2. Kishor Sutar

    HI I am also facing same issue,

    Failed to connect to bitbucket.org port 443: Network is unreachable though I can access it from browser this issue is coming from terminal when i hit "git pull" command.

    unable to pull, push, clone on my Linux machine.

  3. Edney Antonio Reis Filho

    i'm having the same issue...

    adding GIT_CURL_VERBOSE=1 before clone command, the output is:

    $ GIT_CURL_VERBOSE=1 git clone https://edney_reis999@bitbucket.org/edney_reis999 /projetox.git Cloning into 'projetox'... Couldn't find host bitbucket.org in the _netrc file; using defaults timeout on name lookup is not supported Trying 104.192.143.3... connect to 104.192.143.3 port 443 failed: Timed out Trying 104.192.143.1... connect to 104.192.143.1 port 443 failed: Timed out Trying 104.192.143.2... connect to 104.192.143.2 port 443 failed: Timed out Failed to connect to bitbucket.org port 443: Timed out Closing connection 0 fatal: unable to access 'https://edney_reis999@bitbucket.org/edney_reis999/projetox.git/': Failed to connect to bitbucket.org port 443: Timed out

  4. Jim Redmond staff

    If it's timing out when trying to connect, then there's something network-related happening. Can you ping bitbucket.org? Does traceroute to bitbucket.org show anything suspicious?

  5. anuja raut

    Hey am facing the same issue. can access bit bucket through brower but am unable to push ,pull or clone on my linux machine. "ping bitbucket.org" works fine for me Kindly resolve this issue ASAP.

  6. Jim Redmond staff

    Farhan As I asked the others, are you able to ping bitbucket.org or traceroute there?

    anuja raut If you can access through a browser and ping then your network connection is fine - something else is going on, and you'll need to open a support ticket with more detail.

  7. Anonymous

    "ping bitbucket.org" on Windows prompt command return: Request Timed Out.

    fatal: unable to access Failed to connect to bitbucket.org port 443: Timed out

    I was getting same errors : Please check are you using any proxy server for connection, Go to options in sourcetree, then go to Network tab and enter proxy server and port in respective settings. It should work. Thanks

  8. Ashish Panwar

    Hi Team, Getting "Request Time Out" for "ping bitbucket.org". Even in SourceTree, entered the proxy and port details, but still getting: "fatal: unable to access Failed to connect to bitbucket.org port 443: Timed out" Please help me on this.

  9. Jim Redmond staff

    If you can't ping Bitbucket or get to bitbucket.org in a browser on a particular system, then the problem is almost always local to that system. Check its network connectivity, its name resolution, and its routing.

  10. naveen tamanam

    I'm not exactly sure why it's happening. But as per logs it seems like it is trying IPV6 address. Temporarily you can solve this by adding

    104.192.143.2 bitbucket.org

    To /etc/hosts file

    Logs:

    • Couldn't find host bitbucket.org in the .netrc file; using defaults
    • Hostname was NOT found in DNS cache
    • Trying 104.192.143.1...
    • Trying 2401:1d80:1010::150...
    • connect to 2401:1d80:1010::150 port 443 failed: Network is unreachable
    • Trying 2401:1d80:1010::152...
    • connect to 2401:1d80:1010::152 port 443 failed: Network is unreachable
    • Trying 2401:1d80:1010::151...
    • connect to 2401:1d80:1010::151 port 443 failed: Network is unreachable
    • Failed to connect to bitbucket.org port 443: Network is unreachable
    • Closing connection 0
  11. Lawakush Kurmi

    When i am trying to push, getting error : Failed to connect to bitbucket.org port 443: Network is unreachable. In linux system also i've used command ping bitbucket.org working fine. But whenever i am trying to push code not able to push getting same error.

  12. Waris jamal

    Hi, I am trying to get clone of my repo , push or pull getting error : Failed to connect to bitbucket.org port 443: Network is unreachable. every time it shows the same error, can anyone help me out...

  13. Shubham Jain

    Same issue is happening for me. I am able to ping bitbucket.org via command prompt. But when I tried pull command, Its giving me an error: Failed to connect to bitbucket.org port 443: Network is unreachable

  14. Jim Redmond staff

    "Failed to connect" errors could be anything from DNS issues to firewall configurations to local network problems to ISPs that are incompletely routing Bitbucket traffic to national network filters. Unfortunately, there isn't enough detail in any of these comments to diagnose the exact problems, which may or may not be related to each other.

    If you experience this, and you can't find any obvious problems with your own network configuration, please do not comment here but instead open a support ticket with the results of the following commands:

    For OS X, Linux, and other UNIX-based operating systems:

    For Windows:

    • ping -n 10 bitbucket.org
    • ping -n 10 -6 bitbucket.org
    • tracert bitbucket.org
    • tracert -6 bitbucket.org

    (To clarify: "ping6" and "traceroute6" are the IPv6 equivalents of "ping" and "traceroute", respectively, and "GIT_CURL_VERBOSE=1" before any git command will detail all the HTTP-specific parts of the connection. On the Windows side of things, the "-6" in the command line specifies that your computer should use IPv6 for the ping or tracert.)

    Additionally, if you suspect that your problem is related to Bitbucket's IPv6 support, then you should be able to test your overall IPv6 connectivity by opening the following links in your browser:

    Those links should not work at all if your IPv6 connection is disabled or misconfigured. If that's the case, as a temporary workaround (note the heavy emphasis on the word "temporary"!), you can add "104.192.143.3 bitbucket.org" to your hostfile while you work with your network administrators and/or ISP to fix IPv6 access on that system.

    Again: please do not comment here.

  15. Jim Redmond staff

    samitshah1 NA Glad that the hosts file fixed your immediate issue. Since you were able to fix things by forcing an IPv4 address, it sounds like something is mishandling IPv6 traffic between your computer and our systems - either something within your computer, your local network, your ISP, or the path between your ISP and our equipment.

    I'm reluctant to suggest that's the fix for everyone here, though, because "failed to connect" could have many possible causes, and it's better to collect that diagnostic information before applying any kind of "solution". (Also, there are several possible addresses for "bitbucket.org", both in IPv4 and IPv6 address spaces.)

  16. Anand Shankar Bahuguna

    Dhruv Kant, your solution worked for me as well. Thanks.

    Jim Redmond, is that a right approach ? I am operating the repository over HTTPS. In case, you need more information I am ready to provide.

    Also, I could not figure out why my Shell access is disabled and could not figure out how to enable that.

    Thanks for any of your support

  17. Swarnim Srivastava

    Hi, I am new to ubuntu as well as bitbucket. I found from last night i.e. from last 15 hours that push, pull etc command showing same error "Failed to connect to bitbucket.org port 443: Network is unreachable". I am not working on any proxy. And till last night everything was working fine. I found above solution of adding something in /etc/hosts, but I can't find the /hosts in etc. Please help!

  18. naveen tamanam

    This is probably coming when git is trying to push over IPV6. I'm not exactly sure why getting this error with IPV6. But here are different solutions, that you can use to fix this problem.

    Add any one of the following IP into /etc/hosts file to force git to use IPV4

    • 104.192.143.2
    • 104.192.143.3
    • 104.192.143.1

    That is,

    104.192.143.2 bitbucket.org

    To /etc/hosts file

    (Or)

    Upgrade your git to latest version. Probably this could solve the problem else use the following option when you push after you upgrade git (this feature was added newly to git)

    -4, --ipv4 use IPv4 addresses only

    That is ,

    git push -4 bitbucket dev

    You can specify this option -4 while you push, pull or clone.

    (Or)

    You may configure git to use http proxy to solve this problem

    git config --local http.proxy http://proxyuser:proxypwd@proxy.server.com:8080

    If you are already using latest version of git, you can simply use option -4 to force git to use IPV4 address or you can go with /etc/hosts

    If you wanna see debug message while pushing or pulling code you can set following environment variable before you do so,

    export GIT_CURL_VERBOSE=1

  19. Gajanan Kathar

    I also facing same issue, any help regarding this issue.

    gajanan@gajanan-Lenovo-G570:~/odoo/customAddons/odoo9/website/b2b_times$ GIT_CURL_VERBOSE=1 git ls-remote https://bitbucket.org/bitbucket/do_not_delete Couldn't find host bitbucket.org in the .netrc file; using defaults Hostname was NOT found in DNS cache Trying 104.192.143.2... Trying 2401:1d80:1010::151... connect to 2401:1d80:1010::151 port 443 failed: No route to host Trying 2401:1d80:1010::150... connect to 2401:1d80:1010::150 port 443 failed: No route to host Trying 2401:1d80:1010::152... connect to 2401:1d80:1010::152 port 443 failed: No route to host Failed to connect to bitbucket.org port 443: No route to host * Closing connection 0 fatal: unable to access 'https://bitbucket.org/bitbucket/do_not_delete/': Failed to connect to bitbucket.org port 443: No route to host

  20. Marcus Liebhardt

    Modifying the /etc/hosts file is a work around we are also using for now, but it is not a proper solution. If Bitbucket's servers change their IP we will not be able to reach BB anymore (until we modify our hosts setting again).

    Jim Redmond given the many affected users (e.g. we are based in South Korea), there is likely something wrong on BB's side, too. Could you investigate this further?

  21. Jim Redmond staff

    Marcus Liebhardt I strongly agree that /etc/hosts changes should only be temporary workarounds. The diagnostics I've asked for in the pinned comment should be much more useful in determining where the actual problems might be.

    I am skeptical that these problems lie solely on Bitbucket's side, though: while we have had a few dozen reports of trouble, both here and through support tickets, we're currently handling millions of successful IPv6 connections every hour, from many different parts of the world. While the /etc/hosts approach can address that by forcing IPv4 connectivity to Bitbucket, I think it would be more useful in the long term to either fix or disable IPv6 on affected systems.

    Of the support tickets we've received about this, the output from ping6, traceroute6, and the GIT_CURL_VERBOSE=1 command have all indicated routing issues for IPv6 coupled with operating system preference for IPv6. I'm curious to know if those people are able to get to https://ipv6.google.com or https://www.v6.facebook.com - those two sites are IPv6-only versions of Google and Facebook, respectively, and they should not function at all if IPv6 is misconfigured or disabled on your system or on something between your system and the Google/Facebook servers. (Those links are about to go on the pinned comment.)

  22. Shafaq Maalik

    Before I changed my /etc/hosts file as suggested following were the results of commands in Jim's post: pastes will expire in one week time. ping -c10 bitbucket.org results ping6 -c10 bitbucket.org results traceroute bitbucket.org results traceroute6 bitbucket.org results * GIT_CURL_VERBOSE=1 git ls-remote https://bitbucket.org/bitbucket/do_not_delete results

    And the browser DID NOT open the https://ipv6.google.com https://www.v6.facebook.com After editing hosts file bitbucket push is working and strangely these links have started working as well. I understand ipv6 is not configured but why these links have started working?? Anyways thanks it has got me going for now. :)

  23. Nithin Yallankar

    I had the same issue. The trace is attached below. I resolved the issue with changing Wifi connection with different internet provider. The first internet connection was not secured may be that was the issue.

    xxxxxx@xxxxxx-xxxxxx-xxx-xxx:~/xxxxxx/xxxxx/xxxxx$ GIT_CURL_VERBOSE=1 git clone https://xxxxxxx@bitbucket.org/xxxxxx/xxxxxxxxx.git Cloning into 'xxxxxxxxx'... Couldn't find host bitbucket.org in the .netrc file; using defaults Hostname was NOT found in DNS cache Trying 104.192.143.2... Trying 2401:1d80:1010::151... connect to 2401:1d80:1010::151 port 443 failed: Network is unreachable Trying 2401:1d80:1010::152... connect to 2401:1d80:1010::152 port 443 failed: Network is unreachable Trying 2401:1d80:1010::150... connect to 2401:1d80:1010::150 port 443 failed: Network is unreachable Failed to connect to bitbucket.org port 443: Network is unreachable * Closing connection 0 fatal: unable to access 'https://xxxxxxxx@bitbucket.org/xxxxxxxx/xxxxxxxxxx.git/': Failed to connect to bitbucket.org port 443: Network is unreachable xxxxxx@xxxxxx-xxxxxx-xxx-xxx:~/xxxxxx/xxxxx/xxxxx$ ping bitbucket.org PING bitbucket.org (104.192.143.3) 56(84) bytes of data. 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=1 ttl=49 time=249 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=2 ttl=49 time=246 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=3 ttl=49 time=249 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=4 ttl=49 time=247 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=5 ttl=49 time=245 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=6 ttl=49 time=245 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=7 ttl=49 time=247 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=8 ttl=49 time=246 ms 64 bytes from bitbucket.org (104.192.143.3): icmp_seq=9 ttl=49 time=248 ms ^C --- bitbucket.org ping statistics --- 9 packets transmitted, 9 received, 0% packet loss, time 8012ms

  24. Marcus Liebhardt

    Jim Redmond going through your and other tests I can say that something along the line towards BB does not support IPv6, e.g. I cannot reach Google's or Facebook's IPV6 sites either.

    However, I wonder why the recently added support of IPv6 (I started to have issues around that time) has to break backwards compatibility? Do we now need to consider BB to work out-of-the-box only if IPv6 is properly configured? To me this would be a 1 step forward 2 steps backward situation ...

  25. Symatic Solutions

    I believe the issue is with ISP, My ISP is Airtel India too. I tried to visit https://ipv6.google.com with proxy and without proxy. I am able to visit using proxy.

    BTW altering hosts might be the workaround but its not the proper solution. This way I may end up with lots of sites added to my hosts file and I really dont prefer to do so.

    Anyway I have raised a complain at Airtel customer service and also drop a tweet to Airtel customer service twitter account. Others with same ISP should do the same. Send them a tweet to this handler "@Airtel_Presence"

  26. Daniel Stonier (Yujin)

    Jim Redmond going through your and other tests I can say that something along the line towards BB does not support IPv6, e.g. I cannot reach Google's or Facebook's IPV6 sites either.

    Ditto for me, from our lab, and also from my mobile 4G provider.

    However, I wonder why the recently added support of IPv6 (I started to have issues around that time) has to break backwards compatibility? Do we now need to consider BB to work out-of-the-box only if IPv6 is properly configured? To me this would be a 1 step forward 2 steps backward situation ...

    I would have to agree here. If so many people have providers that do not yet work with ipv6, is now the right time to push ipv6 as a default? Is there a way to work with ipv4 as default, and then ipv6 as a fallback, or with some global configuration to take advantage of these if your system is capable?

  27. Jim Redmond staff

    IPv6 isn't a "default" on this end: our load balancers are treating IPv4 and IPv6 traffic identically, and our DNS records will continue to serve both A and AAAA records for the indefinite future. Most of our users are still connecting just fine with pure-IPv4 setups, and a small-but-growing percentage are having no trouble using IPv6 for part or all of their Bitbucket connectivity. And there are already mechanisms intended to let browsers and operating systems choose IPv4 or IPv6 based on latency; the most significant of these is the wonderfully-named "Happy Eyeballs" algorithm, RFC 6555, which has already been implemented in several operating systems and HTTP and SSH clients, but RFC 3484 also discusses other possible selection algorithms.

    The IPv6-specific problems reported here occur when an OS or browser prioritizes IPv6 over IPv4 despite incorrect routes, local or ISP-based misconfiguration, or IPv6-specific firewall rules. In those cases, users can temporarily work around the obstruction, as indicated above, but the underlying problem is still someplace in the network between those users and Bitbucket. (Not all problems reported in this thread are IPv6-specific, though, and I'd greatly prefer if we could pull the IPv6-specific stuff into a different issue.)

    While there are several negative comments here (and on other site/master issues, in our support system, and on social media), the aggregate number of IPv6-related problem reports from the past three weeks is still several orders of magnitude less than our average number of successful IPv6 connections in a single day. That alone makes me skeptical that these IPv6 problems are unique to Bitbucket. However, I'm interested to hear updates from Symatic Solutions about Airtel India's response, along with any details people can share from their respective ISPs (email support@bitbucket.org if you'd like to keep the details private). We're also working on ways to improve route announcement for Atlassian-hosted sites, which may help resolve some of the specific problems that users may be experiencing here, and I'm working on ways we can do a better job targeting results for DNS queries from particular regions or ISPs.

  28. Daniel Stonier (Yujin)

    If there's any negativity inferred from my comment, it wasn't intended. We are also often required to transition across technologies as well so I understand there are always speed bumps. I'm primarily interested in just seeing this working for our devs here. I also don't have the cycles to go deeply investigate ipv4/ipv6 routing, so my comments may be somewhat naive.

    Having said that, for transitions like this one, which are 'under the hood', everything should be done so that it never lands at the user's door. Regardless of where the problem or required development is needed. For us, BB is the only site for which we encounter ipv6 difficulties and have to invest time/effort to work around. Unfortunately for you guys, this generates a certain amount of negativity about bitbucket/atlassian amongst the teams here since they lose time from the work they should be doing in order to get bitbucket specifically to work as expected.

    I'm going to try and reach out to our ISP here and get some data for you as outlined above. I haven't had much success the one time I tried communicating with Korean ISP on similar topics before, but let's see if we can get something useful happening.

  29. RRD Infotech

    is there any update on this ? GIT_CURL_VERBOSE=1 git ls-remote https://bitbucket.org/bitbucket/do_not_delete

    gives, Couldn't find host bitbucket.org in the .netrc file; using defaults Hostname was NOT found in DNS cache Trying 104.192.143.1... Trying 2401:1d80:1010::152... connect to 2401:1d80:1010::152 port 443 failed: Network is unreachable Failed to connect to bitbucket.org port 443: Network is unreachable * Closing connection 0 fatal: unable to access 'https://bitbucket.org/bitbucket/do_not_delete/': Failed to connect to bitbucket.org port 443: Network is unreachable

    My work is stopped. How to fix it ?

    PS: EDITONG host file works but that is a hack to me, why would I do that ?

  30. Daniel Stonier (Yujin)

    Some feedback with our ISP setup:

    • They only do ipv4 routing
    • Their name server resolves both ipv4 and ipv6

    The problem occurs because they sometimes resolve bitbucket.org to both ipv4 and ipv6 ip's. I am not sure why we get back ipv4 always and ipv6 sometimes. If an ipv6 address comes back, then it appears that a modern linux system will default to the ipv6 address. Which then fails, since the ISP does not do ipv6 routing and there does not seem to be a mechanism which lets it fall back gracefully to the ipv4 address.

    Two things I'd like to try:

    • Find some way to get it to fallback gracefully to ipv4 - perhaps this is something the ISP should be helping with, but perhaps there just is no way, I do not know yet
    • Use a nameserver which doesn't resolve names to ipv6 - perhaps this is also something also that the ISP should be doing if they are only routing ipv4

    Another workaround - if you have the above problem and are running a bind9 server on your lan to do nameserving, then you can centralise the hack by adding the following option in /etc/bind/named.conf.options. This saves every user on your network having to workaround in /etc/hosts.

    options {
        // lots of other stuff
        filter-aaaa-on-v4 yes;
    };
    
  31. Robert Henderson

    This happened to me too. I haven't spoken with my ISP, but after reading this thread, I went into my home network configuration and disabled IPv6. Once my router restarted, everything worked. (BTW, the hosts file fix did not work for me)

  32. Arindam Chanda

    I was facing the same problem this morning and upon deeper inspection into my Linux box, I found out that I am using a proxy server. While all the HTTP re-direction were mapped to a different port through the proxy, the HTTPS did not have any such configuration. BitBucket uses HTTPS. I just exported the proxy server's address and port number to the environment variable and everything started working! Command is >> export https_proxy=”<proxyServerName>:<proxyPort>” <<

    //Arindam

  33. soul
    Pinging bitbucket.org [104.192.143.3] with 32 bytes of data:
    Request timed out.
    Reply from 104.192.143.3: bytes=32 time=333ms TTL=47
    Reply from 104.192.143.3: bytes=32 time=334ms TTL=47
    Reply from 104.192.143.3: bytes=32 time=332ms TTL=47
    Reply from 104.192.143.3: bytes=32 time=334ms TTL=47
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.
    Reply from 104.192.143.3: bytes=32 time=333ms TTL=47
    
    Ping statistics for 104.192.143.3:
        Packets: Sent = 10, Received = 5, Lost = 5 (50% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 332ms, Maximum = 334ms, Average = 333ms
    
    C:\Users\Administrator>
    
  34. soul
    C:\Users\Administrator>tracert bitbucket.org
    
    Tracing route to bitbucket.org [104.192.143.2]
    over a maximum of 30 hops:
    
      1    <1 ms    <1 ms    <1 ms  bogon [192.168.1.1]
      2     1 ms     2 ms    <1 ms  124.42.239.158
      3     4 ms     4 ms     3 ms  bogon [10.132.161.113]
      4     1 ms     1 ms     2 ms  bogon [10.132.161.109]
      5     1 ms     2 ms     1 ms  10.132.161.14
      6     5 ms     5 ms     5 ms  bogon [192.168.111.17]
      7     2 ms     3 ms     3 ms  bogon [172.16.33.1]
      8     1 ms     2 ms     1 ms  221.4.121.113
      9     3 ms     2 ms     1 ms  221.4.6.65
     10     5 ms     7 ms     2 ms  120.81.0.53
     11    31 ms    30 ms    32 ms  219.158.6.245
     12   130 ms   120 ms   111 ms  219.158.23.118
     13   126 ms   126 ms   130 ms  219.158.103.106
     14   176 ms   184 ms   166 ms  219.158.38.98
     15   178 ms   178 ms   178 ms  ae-4.akamai-prolexic.tokyjp05.jp.bb.gin.ntt.net
    [203.105.72.234]
     16   283 ms   285 ms   277 ms  unknown.prolexic.com [72.52.56.202]
     17    60 ms    59 ms    60 ms  unknown.prolexic.com [72.52.56.205]
     18     *        *        *     Request timed out.
     19   224 ms   224 ms   226 ms  unknown.prolexic.com [72.52.39.182]
     20     *        *        *     Request timed out.
     21   216 ms   216 ms   214 ms  bitbucket.org [104.192.143.2]
    
    Trace complete.
    
    C:\Users\Administrator>
    
  35. Log in to comment