2015-11-06 70 views
-1

我已經在更新的Bluemix基礎平臺下對Python 2.7下開發的Bluemix應用程序進行了全新部署(比較推送)。部署在Python PIP機制中顯示錯誤,該機制是默認的軟件包安裝程序。顯然,錯誤的類型可能與操作系統級缺少安裝openssl-devel軟件包(SSL支持)有關。平臺升級後的Bluemix和Python /部署錯誤

Error message: ValueError: unsupported hash type md5 
Error message: ImportError: No module named 'pip._vendor.requests' 

登錄:

cf push oauthAqua1 -m 64M -b " https://github.com/cloudfoundry/cf-buildpack-python.git " -c "python ssl_server.py"

Enviando oauthAqua1... Enviando app com arquivos do caminho: C:\mobile\myprojects\oauth Enviando 231.6K, 37 arquivos OK

Parando app oauthAqua1 na org [email protected]/espaço dev como [email protected] m.com... OK

Inicializando app oauthAqua1 na org [email protected]/espaço dev como claudef @br.ibm.com... OK -----> Downloaded app package (132K) -----> Downloaded app buildpack cache (27M) Cloning into '/tmp/buildpacks/cf-buildpack-python'... Submodule 'compile-extensions' (https://github.com/cloudfoundry/compile-exte nsions.git) registered for path 'compile-extensions' Cloning into 'compile-extensions'... Submodule path 'compile-extensions': checked out 'b5e0cf7be729718d162d56709ec7f2 7d34e68c7c' -------> Buildpack version 1.5.1 ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[__func_name] = __get_hash(__func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in __get_builtin constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[func_name] = get_hash(func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in get_builtin constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1 ERROR:root:code for hash sha224 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[func_name] = get_hash(func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in get_builtin constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha224 ERROR:root:code for hash sha256 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[func_name] = get_hash(func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in get_builtin constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha256 ERROR:root:code for hash sha384 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[func_name] = get_hash(func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in get_builtin constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha384 ERROR:root:code for hash sha512 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[func_name] = get_hash(func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in get_builtin constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha512 Traceback (most recent call last): File "/app/.heroku/python/bin/pip", line 9, in load_entry_point('pip==6.0.6', 'console_scripts', 'pip')() File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 519, in lo ad_entry_point File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 2630, in l oad_entry_point File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 2310, in l oad File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 2316, in r esolve File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/ init.py", line 15, in from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/ vcs/mercurial.py", line 11, in from pip.download import path_to_url File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/ download.py", line 30, in from pip.vendor import requests, six File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/ vendor/init.py", line 81, in load_module raise ImportError("No module named '%s'" % (name,)) ImportError: No module named 'pip.vendor.requests' ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[func_name] = get_hash(func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in _get_builtin constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in globals()[func_name] = get_hash(func_name) File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in _get_builtin _constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1

FALHA Erro no servidor, código de resposta: 400, código de erro: 170004, mensagem: App staging failed in the buildpack compile phase

DICA: utilize 'cf logs oauthAqua1 --recent' para maiores informações ... 2015-10-30T18:38:02.17-0200 [STG] ERR from .ssl_ import ( 2015-10-30T18:38:02.17-0200 [STG] ERR File "/app/.heroku/python/lib/pytho 2.7/site-packages/pip-7.1.0-py2.7.egg/pip/vendor/requests/packages/urllib3/uti /ssl.py", line 2, in 2015-10-30T18:38:02.17-0200 [STG] ERR from hashlib import md5, sha1, sh 256 2015-10-30T18:38:02.17-0200 [STG] ERR ImportError: cannot import name md5 2015-10-30T18:38:02.20-0200 [STG] OUT Staging failed: Buildpack compilation step failed 2015-10-30T18:38:02.42-0200 [API] ERR encountered error: App staging failed in the buildpack compile phase

我有同樣的問題,當我用一箇舊buildpack像https://github.com/cloudfoundry/cf-buildpack-python.git#v1.1.2

+0

無法讀取未格式化的輸出。 –

回答

0

從@chughts收到一個重要的暗示:
我懷疑它是抓住你的堆棧。我認爲Bluemix上支持的堆棧現在是cf_linuxfs2。您將需要使用支持此堆棧的構建包。

我的解決辦法:

一個新的與最新的Python部署buildpack固定的問題:

cf push myapp1 -m 64M -b "https://github.com/cloudfoundry/cf-buildpack-python.git#v1.5.1" -c "python server.py" 

崩潰的消息就解決了。謝謝@你的提示和支持。問題解決了。