CF推送到Bluemix失败了

时间:2017-01-16 21:29:52

标签: ibm-cloud

我尝试将Node.js应用推送到Bluemix。该应用程序在我的Mac上工作正常但在Bluemix上由于某种原因没有启动。

Bluemix 日志包含一些错误:

CELL/0Starting health monitoring of containerJan 16, 2017 10:12:29 PM
APP/0runtime: failed to create new OS thread (have 5 already; errno=11)Jan 16, 2017 10:12:29 PM
APP/0runtime: may need to increase max user processes (ulimit -u)Jan 16, 2017 10:12:29 PM
APP/0fatal error: newosprocJan 16, 2017 10:12:29 PM
APP/0Express app running on port 3000Jan 16, 2017 10:12:30 PM
CELL/0Timed out after 1m0s: health check never passed.Jan 16, 2017 10:13:31 PM
CELL/0Exit status 0Jan 16, 2017 10:13:31 PM
CELL/0Destroying containerJan 16, 2017 10:13:42 PM
API/0App instance exited with guid a1525a65-4e18-41c6-87a0-53656bc45810 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 1 error(s) occurred:\n\n* Exited with status 4\n* 2 error(s) occurred:\n\n* cancelled\n* process did not exit", "crash_count"=>3, "crash_timestamp"=>1484601222302319454, "version"=>"3480d7ed-0634-4cd6-a43a-94e490c3cafb"}Jan 16, 2017 10:13:42 PM
CELL/0Successfully destroyed containerJan 16, 2017 10:13:45 PM
CELL/0Creating containerJan 16, 2017 10:14:22 PM
CELL/0Successfully created containerJan 16, 2017 10:14:34 PM
CELL/0Starting health monitoring of containerJan 16, 2017 10:14:36 PM
APP/0Express app running on port 3000Jan 16, 2017 10:14:36 PM
CELL/0Timed out after 1m0s: health check never passed.Jan 16, 2017 10:15:37 PM
CELL/0Exit status 0Jan 16, 2017 10:15:37 PM
CELL/0Destroying containerJan 16, 2017 10:15:48 PM
API/4App instance exited with guid a1525a65-4e18-41c6-87a0-53656bc45810 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 1 error(s) occurred:\n\n* Exited with status 4\n* 2 error(s) occurred:\n\n* cancelled\n* process did not exit", "crash_count"=>4, "crash_timestamp"=>1484601348331703378, "version"=>"3480d7ed-0634-4cd6-a43a-94e490c3cafb"}Jan 16, 2017 10:15:48 PM
CELL/0Successfully destroyed containerJan 16, 2017 10:15:49 PM
CELL/0Creating containerJan 16, 2017 10:16:54 PM
CELL/0Successfully created containerJan 16, 2017 10:17:04 PM
APP/0Starting app with 'node app.js 'Jan 16, 2017 10:17:08 PM
APP/0Express app running on port 3000Jan 16, 2017 10:17:08 PM

附加配置文件:

1。 manifest.yml

---
applications:
- name: tks
  memory: 256M
  instances: 1
  host: tks

2。 package.json

{
  "name": "ski-dictionary",
  "version": "1.0.0",
  "description": "A collection of skier terms and definitions",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node app.js"
  },
  "author": "Peter Schleinitz",
  "license": "MIT",
  "dependencies": {
    "body-parser": "^1.14.1",
    "cors": "^2.7.1",
    "express": "^4.13.3",
    "request": "^2.79.0"
  }
}

希望有所帮助。

1 个答案:

答案 0 :(得分:1)

可能存在许多问题,但我认为这可能是最可能的原因:

<强> 1。您的端口未在Bluemix上正确设置

这可以解释为什么您的应用在本地运行,但不能在Bluemix上运行。我以前遇到过这个问题,所以我查看了我的配置文件,以确保一切设置正确。验证您可以运行和部署一个简单的Node示例,如下所示:

https://github.com/IBM-Bluemix/node-helloworld

<强> 2。您可能需要增加超时

如果您的应用程序特别大,您可能需要增加超时。为此,请在清单中添加超时标志:

例如

timeout: 120

https://docs.cloudfoundry.org/devguide/deploy-apps/large-app-deploy.html

如果无法访问代码,重现问题会有点困难,但如果上述解决方案适合您,请告诉我。