首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不可测星系集合安装超时

不可测星系集合安装超时
EN

Stack Overflow用户
提问于 2020-10-22 09:51:11
回答 1查看 2.9K关注 0票数 2

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

代码语言:javascript
复制
# 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

问题很明显:

代码语言:javascript
复制
# 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

因此,我决定从tarball安装集合,并在相同的问题中结束,但这次是通过下载依赖项超时来安装的。

代码语言:javascript
复制
# ansible-galaxy collection install community-general-1.2.0.tar.gz -p /home/ansible/.ansible/collections -vvvv
.....
Process install dependency map
.....
Starting collection install process
Installing 'community.general:1.2.0' to '/home/ansible/.ansible/collections/ansible_collections/community/general'
Installing 'ansible.netcommon:1.3.0' to '/home/ansible/.ansible/collections/ansible_collections/ansible/netcommon'
Downloading https://galaxy.ansible.com/download/ansible-netcommon-1.3.0.tar.gz to /home/ansible/.ansible/tmp/ansible-local-1151707428cblg0/tmpbph_yq9r
ERROR! Unexpected Exception, this is probably a bug: The read operation timed out

操作系统是Centos8,Ansible配置文件是从安装包源文件.

代码语言:javascript
复制
$ 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)]

知道如何克服这个问题吗?

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2022-07-06 07:48:49

也许你的网络提供商阻止了网站https://galaxy.ansible.com/,尝试使用代理服务器。

代码语言:javascript
复制
export http_proxy=http://proxy_server_ip:port;
export https_proxy=http://proxy_server_ip:port;
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64479697

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档