pypi.python.org_连接到pypi.python.org timed ou

在尝试通过Chef客户端使用Python 2.7.8执行get-pip.py时,遇到连接到pypi.python.org超时的错误。资源执行失败,多次重试后仍无法下载pip。问题可能与网络连接、Python版本或文件权限有关。
摘要由CSDN通过智能技术生成

我正在管理一个RHELServer6.x,它为一个应用程序安装了Python-2.7.8。当以下厨师资源由厨师客户端执行时。execute "/usr/local/bin/python2.7 #{node[:base_dir]}/get-pip.py"

我在厨师客户端日志中看到以下错误。[2015-02-24T17:42:27+00:00] ERROR: execute[/usr/local/bin/python2.7 /opt/mount/get-pip.py] (python_app::default line 105) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'

---- Begin output of /usr/local/bin/python2.7 /opt/mount1/get-pip.py ----

STDOUT: Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/

Could not find any downloads that satisfy the requirement pip in /usr/local/lib/python2.7/site-packages

Collecting pip

No distributions at all found for pip in /usr/local/lib/python2.7/site-packages

STDERR:

---- End output of /usr/local/bin/python2.7 /opt/mount1/get-pip.py ----

我正在查找这个问题的python。我注意到有另一个版本的python。我想这是随rhel安装而来的。Python 2.6.6

python 2.7.8是使用chef安装的,如下所示:ark 'python' do

url 'https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz'

path "/opt/mount/"

owner 'python'

action :put

end

execute "cd #{node[:base_dir]}/python && ./configure && make && make altinstall" do

not_if { File.exists?('/usr/local/bin/python2.7') }

end

我观察到的一件事是'/opt/mount/python'由'root'拥有,而不是由'python'用户拥有。

知道为什么会有这些错误信息吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值