我在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
在运行时日志中:
10/28/2015 9:24:07 AM ERR App * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
10/28/2015 9:58:09 AM ERR App * Restarting with stat
10/28/2015 9:24:00 AM OUT DEA Starting app instance (index 0) with guid 496de9a2-8ab4-4248-b988-5cb103c49631
10/28/2015 9:58:02 AM OUT DEA Starting app instance (index 0) with guid 496de9a2-8ab4-4248-b988-5cb103c49631
10/28/2015 10:02:37 AM OUT DEA Stopping app instance (index 0) with guid 496de9a2-8ab4-4248-b988-5cb103c49631
10/28/2015 9:57:47 AM OUT STG -----> Uploading droplet (39M)
10/28/2015 9:59:45 AM OUT DEA Starting app instance (index 0) with guid 496de9a2-8ab4-4248-b988-5cb103c49631
10/28/2015 10:06:38 AM OUT API App instance exited with guid 496de9a2-8ab4-4248-b988-5cb103c49631 payload: {"cc_partition"=>"default", "droplet"=>"496de9a2-8ab4-4248-b988-5cb103c49631", "version"=>"0d251841-0184-4aab-8f3a-c6033e6d6cba", "instance"=>"ff29229ce4eb470c9dcad7d49d67b994", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1446026798}
10/28/2015 9:58:09 AM ERR App * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
10/28/2015 9:59:57 AM ERR App * Restarting with stat
10/28/2015 9:57:34 AM OUT STG You should consider upgrading via the 'pip install --upgrade pip' command.
10/28/2015 9:57:34 AM ERR STG You should consider upgrading via the 'pip install --upgrade pip' command.
10/28/2015 9:59:09 AM ERR DEA Instance (index 0) failed to start accepting connections
10/28/2015 9:57:09 AM OUT API Updated app with guid 496de9a2-8ab4-4248-b988-5cb103c49631 ({"state"=>"STOPPED"})
10/28/2015 10:03:00 AM OUT DEA Starting app instance (index 0) with guid 496de9a2-8ab4-4248-b988-5cb103c49631
10/28/2015 10:09:55 AM OUT App
感谢您的帮助。
答案 0 :(得分:1)
问题可能与硬编码端口号有关。您的日志显示服务器正在侦听5000.
10/28/2015 9:58:09 AM ERR App *在http://0.0.0.0:5000/上运行 (按CTRL + C退出)
在Bluemix上运行应用程序时,无法请求特定端口。您必须使用平台为您的应用程序分配的端口。
请查看:Flask代码示例[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