The API server (https://galaxy.ansible.com/api/) is not responding, please try again later.

I’m simply stumped on why this is happening.

When I try to use ansible-galaxy it returns:

ERROR! The API server (https://galaxy.ansible.com/api/) is not responding, please try again later.

I’ve tried Ansible 2.0.0.2 as well as 1.9.4. Also tried using Googles DNS–doesn’t help. Ive tried this command in two countries (Ecuador and Peru, it worked for my first few installs while in Peru making me wonder if I’m blacklisted…). Ping does not work and if I try https://www.site24x7.com/ping-test.html it also reports 100% packet loss from all destinations. Same with ansible.com though so makes me wonder if you’re just ignoring ping requests… Curl does work.

A traceroute stops at the following server:

traceroute to galaxy.ansible.com (40.118.209.130), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 1.603 ms 1.083 ms 1.037 ms
2 1.191-100-88.etapanet.net (191.100.88.1) 18.139 ms 17.512 ms 16.680 ms
3 10.190.1.14 (10.190.1.14) 18.256 ms 19.670 ms 21.345 ms
4 10.180.0.13 (10.180.0.13) 18.989 ms 18.464 ms 18.502 ms
5 201.219.36.101 (201.219.36.101) 24.008 ms 24.444 ms 24.388 ms
6 190.152.252.110 (190.152.252.110) 26.088 ms
190.152.252.102 (190.152.252.102) 25.001 ms 30.970 ms
7 190.152.251.189 (190.152.251.189) 86.164 ms 85.686 ms 89.481 ms
8 * * *
9 ae-2-52.edge1.miami2.level3.net (4.69.138.107) 91.048 ms 85.777 ms 91.764 ms
10 ae-1-51.edge1.miami2.level3.net (4.69.138.75) 91.666 ms
ae-2-52.edge1.miami2.level3.net (4.69.138.107) 86.932 ms
ae-1-51.edge1.miami2.level3.net (4.69.138.75) 86.563 ms
11 microsoft-c.edge1.miami2.level3.net (4.59.80.22) 88.344 ms 85.205 ms 101.111 ms
12 104.44.5.14 (104.44.5.14) 165.589 ms 167.217 ms 174.259 ms
13 104.44.4.205 (104.44.4.205) 176.770 ms 170.103 ms 166.495 ms
14 be-2-0.ibr02.lax03.network.microsoft.com (104.44.4.4) 164.313 ms 163.521 ms 165.937 ms
15 be-1-0.ibr01.lax03.network.microsoft.com (104.44.4.0) 167.231 ms 169.282 ms 166.034 ms
16 be-4-0.ibr01.by2.network.microsoft.com (104.44.4.3) 166.235 ms 168.959 ms 171.492 ms
17 ae81-0.bay-96c-1a.ntwk.msn.net (104.44.8.185) 165.265 ms
ae82-0.bay-96c-1b.ntwk.msn.net (104.44.8.187) 166.205 ms 168.473 ms
18 * * *
19 * * *
20 * * *
21 * * *

Could you confirm if ping should be working?

I’m using a whole bunch of different package managers and I have no probems with: npm, bower, pip, brew, composer, pecl, apt, yum.

So ping to galaxy fails for me, but web access to
https://galaxy.ansible.com/api/ returns 200 ok, so the service is
working as expected.

--g

Thanks, so guess ping isn’t supposed to work anyway. I was stuck looking at the wrong place.

That led me to debug more and figured out it was a certificate validation error. For some reason my El Capitan openssl setup didn’t have any CA certificates. For future reference I fixed it y exporting my keychain and moving the .pem into /System/Library/OpenSSL/certs/