Issue with downloading Collections. Getting Name Resolution error

I have a playbook that references a requirements file to download that certain collections are available. When I run the playbook I get an name resolution error however I can still ping galaxy.ansible.com. I have tried increasing the timeout period but I still get the same error. I tested this out in a command prompt and I seem to get the same output as when I run the playbook. This happens with any collection I use. I can’t figure out if there is something wrong with my set up or if there is an issue external to me that is causing this.

Output form Command prompt:

$ ansible-galaxy collection install freeipa.ansible_freeipa
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/freeipa-ansible_freeipa-1.17.0.tar.gz to /home/ansi-admin/.ansible/tmp/ansible-local-9501m44wn9ls/tmpk3iqxq4g/freeipa-ansible_freeipa-1.17.0-rh5glwpk
[ERROR]: Failed to download collection tar from 'default': <urlopen error [Errno -3] Temporary failure in name resolution>

Failed to download collection tar from 'default': <urlopen error [Errno -3] Temporary failure in name resolution>

<<< caused by >>>

<urlopen error [Errno -3] Temporary failure in name resolution>

Don’t know if it’s related, but Galaxy was very slow for me today as well.

The error points to a DNS resolution issue rather than a timeout. Try getent hosts galaxy.ansible.com and curl -v https://galaxy.ansible.com/api/ from the same environment. If DNS fails, check /etc/resolv.conf, DNS settings, proxy, and firewall configuration. Pinging the hostname alone doesn’t guarantee Ansible/Python can resolve it correctly.

I ran this command and it does seem to resolv DNS as indicated below.. IPv6 is failing but I am not running it in my environment so I am pretty sure I can ignore those. I am not seeing any other issues with the connection.

# curl -v https://galaxy.ansible.com/api/
* Host galaxy.ansible.com:443 was resolved.
* IPv6: 2606:4700:20::681a:1ea, 2606:4700:20::681a:ea, 2606:4700:20::ac43:44fb
* IPv4: 104.26.0.234, 172.67.68.251, 104.26.1.234
*   Trying [2606:4700:20::681a:1ea]:443...
* Immediate connect fail for 2606:4700:20::681a:1ea: Network is unreachable
*   Trying [2606:4700:20::681a:ea]:443...
* Immediate connect fail for 2606:4700:20::681a:ea: Network is unreachable
*   Trying [2606:4700:20::ac43:44fb]:443...
* Immediate connect fail for 2606:4700:20::ac43:44fb: Network is unreachable
*   Trying 104.26.0.234:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519MLKEM768 / id-ecPublicKey
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=ansible.com
*  start date: Aug 17 12:02:59 2026 GMT
*  expire date: Nov 15 13:02:55 2026 GMT
*  subjectAltName: host "galaxy.ansible.com" matched cert's "*.ansible.com"
*  issuer: C=US; O=Google Trust Services; CN=WE1
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA256
*   Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 2: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using ecdsa-with-SHA384
* Connected to galaxy.ansible.com (104.26.0.234) port 443
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://galaxy.ansible.com/api/
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: galaxy.ansible.com]
* [HTTP/2] [1] [:path: /api/]
* [HTTP/2] [1] [user-agent: curl/8.14.1]
* [HTTP/2] [1] [accept: */*]
> GET /api/ HTTP/2
> Host: galaxy.ansible.com
> User-Agent: curl/8.14.1
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 200
< date: Tue, 15 Sep 2026 13:02:08 GMT
< content-type: application/json
< content-length: 46
< server: cloudflare
< vary: Accept, Accept-Language, Cookie
< allow: GET, HEAD, OPTIONS
< correlation-id: e6f1ab55c9a244f7b22da3f5593c3fa1
< access-control-expose-headers: Correlation-ID
< content-language: en-us
< x-frame-options: SAMEORIGIN
< x-content-type-options: nosniff
< referrer-policy: same-origin
< cross-origin-opener-policy: same-origin
< set-cookie: [obscured]; path=/; HttpOnly; Secure; SameSite=None
< cf-cache-status: DYNAMIC
< report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=[obsucured]"}]}
< nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
< cf-ray: a3b7d2d17a7a7769-YYZ
<
* Connection #0 to host galaxy.ansible.com left intact
{"available_versions":{"v3":"v3/","v1":"v1/"}

I did see another thread that seems to indicate timeout errors. The errors showed there seem a bit different than mine but it does seem like there is an issue on the otherside of the connection.
I did have it run through once by chance but haven’t been able to get it to go again.