# Error when trying to install collection from ansible awx

**URL:** <https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212>\
**Category:** Get Help\
**Tags:** awx, collections, galaxy-ng\
**Created:** [November 28, 2024, 10:31pm UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212 "2024-11-28T22:31:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dexrva](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@Dexrva](https://forum.ansible.com/u/Dexrva)\
**Post date:** [November 28, 2024, 10:31pm UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212/1 "2024-11-28T22:31:39Z")

</div>

Hi everyone,

I have to install some collections so I put it inside “collections/requirements.yml” but when I tried to synchronize my project I get errors with ansible galaxy URL

```auto
"[WARNING]: Skipping Galaxy server https://galaxy.ansible.com/api/. Got an",
    "unexpected error when getting available versions of collection",
    "community.general: Unknown error when attempting to call Galaxy at",
    "'https://galaxy.ansible.com/api/v3/collections/community/general/': <urlopen",
    "error [Errno -2] Name or service not known>. <urlopen error [Errno -2] Name or",
    "service not known>",
    "ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/v3/collections/community/general/': <urlopen error [Errno -2] Name or service not known>. <urlopen error [Errno -2] Name or service not known>"

```

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [November 30, 2024, 11:54pm UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212/2 "2024-11-30T23:54:52Z")

</div>

can you share the requirements.yml ?

---

<div class="post-metadata">

**Author:** ![Dexrva](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@Dexrva](https://forum.ansible.com/u/Dexrva)\
**Post date:** [December 2, 2024, 4:38pm UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212/3 "2024-12-02T16:38:42Z")

</div>

This is my requirements.yml:

* * *

collections:

# Install a collection from Ansible Galaxy.

- name: community.general

- name: microsoft.ad

- name: community.windows

- name: community.vmware

- name: fortinet.fortios

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [December 2, 2024, 5:07pm UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212/4 "2024-12-02T17:07:18Z")

</div>

The error indicated a DNS failure when resolving `galaxy.ansible.com`:

```auto
Name or service not known

```

This could be any number of issues, but the end result is that DNS within your environment seems broken in some way.

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [December 2, 2024, 5:24pm UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212/5 "2024-12-02T17:24:52Z")

</div>

@Dexrva whats the result when try to ping [galaxy.ansible.com](http://galaxy.ansible.com) from the same machine you’re trying to install the collections in your requirements.yml?

---

<div class="post-metadata">

**Author:** ![Dexrva](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@Dexrva](https://forum.ansible.com/u/Dexrva)\
**Post date:** [December 3, 2024, 9:05pm UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212/6 "2024-12-03T21:05:26Z")

</div>

I cannot ping from inside the pod, but I can perform a curl request to `galaxy.ansible.com`, and it works as expected:

**Inside the Pod:**

bash-5.1$ curl [https://galaxy.ansible.com](https://galaxy.ansible.com)  
Ansible Galaxy

\<div id=“consent\_blackbar” style="position: fixed; bottom: 0; width: 100%; z-index: 5; padding: 1

On the Linux Host:

[ii4ipat1@host ~]$ ping [galaxy.ansible.com](http://galaxy.ansible.com)  
PING [galaxy.ansible.com](http://galaxy.ansible.com) (172.67.68.251) 56(84) bytes of data.  
64 bytes from 172.67.68.251 (172.67.68.251): icmp\_seq=1 ttl=55 time=56.3 ms  
64 bytes from 172.67.68.251 (172.67.68.251): icmp\_seq=2 ttl=55 time=56.2 ms  
64 bytes from 172.67.68.251 (172.67.68.251): icmp\_seq=3 ttl=55 time=56.2 ms  
64 bytes from 172.67.68.251 (172.67.68.251): icmp\_seq=4 ttl=55 time=56.2 ms

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [December 6, 2024, 12:06am UTC](https://forum.ansible.com/t/error-when-trying-to-install-collection-from-ansible-awx/11212/7 "2024-12-06T00:06:33Z")

</div>

whats the default galaxy credential in your organization thats running the job template? usually it comes with a url
