我在Bluemix部署pythonFlask项目时出错

2024-05-29 04:27:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我在GitHub的项目中添加了bootstrap.css和.js文件。在Bluemix,构建过程已经成功完成,但是部署没有成功完成。我遇到一个错误,下面是部署过程日志:

Started by user cemalturkoglu
Building remotely on jenkins-deploy-slave-eda13aeb1278 (.*Deploy) in workspace /home/jenkins/workspace/44919572-1001-f01d-cdb7-8de2ad9d78a6/a904f930-8fef-42ac-97af-0b2e80cc3743
Unable to access upstream artifacts area /jenkins/jobs/44919572-1001-f01d-cdb7-8de2ad9d78a6/jobs/49689c68-d0d9-4488-9113-6b9603542bc6/builds/2015-10-27_19-53-32/archive. Does source project archive artifacts?
Downloading artifacts ...
DOWNLOAD SUCCESSFUL
Total time: 2 seconds
[a904f930-8fef-42ac-97af-0b2e80cc3743] $ /bin/bash /tmp/hudson1326255167701331280.sh
+ cat /etc/lsb-release /etc/os-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
+ cf --version
/usr/bin/cf-orig/cf version 6.7.0-IDS-2014-12-04T10:56:46+00:00
+ echo 'Target: https://api.ng.bluemix.net'
Target: https://api.ng.bluemix.net
+ source _deploy.sh
++ cf push itucsdb1525
Using manifest file /home/jenkins/workspace/44919572-1001-f01d-cdb7-8de2ad9d78a6/a904f930-8fef-42ac-97af-0b2e80cc3743/manifest.yml

Updating app itucsdb1525 in org turkogluc@itu.edu.tr / space dev as turkogluc@itu.edu.tr...
OK

Using route itucsdb1525.mybluemix.net
Uploading itucsdb1525...
Uploading app files from: /home/jenkins/workspace/44919572-1001-f01d-cdb7-8de2ad9d78a6/a904f930-8fef-42ac-97af-0b2e80cc3743
Uploading 112.1K, 46 files


Done uploading
OK

Stopping app itucsdb1525 in org turkogluc@itu.edu.tr / space dev as turkogluc@itu.edu.tr...
OK

Starting app itucsdb1525 in org turkogluc@itu.edu.tr / space dev as turkogluc@itu.edu.tr...
-----> Downloaded app package (132K)
-----> Downloaded app buildpack cache (39M)
-------> Buildpack version 1.3.1
-----> Installing dependencies with pip
       You are using pip version 6.1.0.dev0, however version 7.1.2 is available.
       You should consider upgrading via the 'pip install --upgrade pip' command.
You are using pip version 6.1.0.dev0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
-----> Uploading droplet (39M)

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 failing
FAILED
Start unsuccessful

TIP: use 'cf logs itucsdb1525 --recent' for more information
Build step 'Execute shell' marked build as failure
Finished: FAILURE

运行时日志中:

^{pr2}$

谢谢你的帮助。


Tags: pipofinstancesappversionrunningtrcf
1条回答
网友
1楼 · 发布于 2024-05-29 04:27:49

问题可能与硬编码端口号有关。您的日志显示服务器正在监听5000。在

10/28/2015 9:58:09 AM ERR App * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

在Bluemix上运行应用程序时,不能请求特定端口。您必须使用平台为您的应用程序分配的端口。在

请审阅:烧瓶代码样本[1]

此处定义端口:[2]

[1]https://github.com/IBM-Bluemix/bluemix-python-flask-sample

[2]https://github.com/IBM-Bluemix/bluemix-python-flask-sample/blob/master/welcome.py#L28

相关问题 更多 >

    热门问题