我正在管理一个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'用户拥有。
知道为什么会有这些错误信息吗?