ansible galaxy集合安装超时

ansible galaxy集合安装超时,ansible,timeout,ansible-galaxy,Ansible,Timeout,Ansible Galaxy,我在安装ansible集合时遇到问题,该集合将以超时结束 # ansible-galaxy collection install community.general -vvvv ansible-galaxy 2.9.9 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/mo

我在安装ansible集合时遇到问题,该集合将以超时结束

# ansible-galaxy collection install community.general -vvvv
ansible-galaxy 2.9.9
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible-galaxy
  python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /etc/ansible/ansible.cfg as config file
Process install dependency map
Initial connection to galaxy_server: https://galaxy.ansible.com
Created /root/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
Processing requirement collection 'community.general'
Collection requirement 'community.general' is the name of a collection
Found API version 'v1, v2' with Galaxy server default (https://galaxy.ansible.com/api/)
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/community/general/versions/
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/community/general/versions/1.2.0/
Collection 'community.general' obtained from server default https://galaxy.ansible.com/api/
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/google/cloud/versions/
Processing requirement collection 'google.cloud' - as dependency of community.general
Collection requirement 'google.cloud' is the name of a collection
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/google/cloud/versions/?page=2
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/ansible/posix/versions/
Collection 'google.cloud' obtained from server default https://galaxy.ansible.com/api/
Processing requirement collection 'ansible.posix' - as dependency of community.general
Collection requirement 'ansible.posix' is the name of a collection
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/ansible/posix/versions/?page=2
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/ansible/posix/versions/?page=3
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/ansible/posix/versions/?page=4
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/ansible/posix/versions/?page=5
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/ansible/netcommon/versions/
Collection 'ansible.posix' obtained from server default https://galaxy.ansible.com/api/
Processing requirement collection 'ansible.netcommon' - as dependency of community.general
Collection requirement 'ansible.netcommon' is the name of a collection
Calling Galaxy at https://galaxy.ansible.com/api/v2/collections/ansible/netcommon/versions/?page=2
ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/v2/collections/ansible/netcommon/versions/?page=2': The read operation timed out

$ time curl https://galaxy.ansible.com/api/
{"description":"GALAXY REST API","current_version":"v1","available_versions":{"v1":"v1/","v2":"v2/"},"server_version":"3.4.7","version_name":"Doin' it Right","team_members":["chouseknecht","cutwater","alikins","newswangerd","awcrosby","tima","gregdek"]}
real    0m0.502s
user    0m0.028s
sys     0m0.015s
问题很明显:

# time curl https://galaxy.ansible.com/api/v2/collections/ansible/netcommon/versions/?page=2
<---- PAYLOAD ---->
real    0m0.979s
user    0m0.037s
sys     0m0.018s

# time curl https://galaxy.ansible.com/api/v2/collections/ansible/netcommon/versions/?page=2
<---- PAYLOAD ---->
real    0m16.729s
user    0m0.029s
sys     0m0.014s

# ping galaxy.ansible.com
PING galaxy.ansible.com (104.26.0.250) 56(84) bytes of data.
.....
44 packets transmitted, 44 received, 0% packet loss, time 104ms
rtt min/avg/max/mdev = 2.815/5.372/30.278/5.817 ms

# ping 8.8.8.8
.....
24 packets transmitted, 24 received, 0% packet loss, time 59ms
rtt min/avg/max/mdev = 2.866/4.895/25.451/4.608 ms
操作系统是Centos8,Ansible配置文件来自安装包

$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
PLATFORM_ID="platform:el8"

$ ansible --version
ansible 2.9.9
  config file = /home/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
你知道如何克服这个问题吗


谢谢

我猜你和互联网之间有一个代理服务器?对不起,忘了提一下:没有代理。也没有任何干扰互联网连接的东西(mikrotik上的伪装没有限制)我猜你和互联网之间有一个代理服务器?对不起,忘了提一下:没有代理。也不会干扰互联网连接(仅mikrotik上的伪装,没有限制)
$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
PLATFORM_ID="platform:el8"

$ ansible --version
ansible 2.9.9
  config file = /home/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]