Ibm cloud CF推送到Bluemix失败
我尝试将Node.js应用程序推送到Bluemix。该应用程序在我的Mac电脑上运行良好,但由于某种原因在Bluemix上无法启动 Bluemix日志包含一些错误:Ibm cloud CF推送到Bluemix失败,ibm-cloud,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 A
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。Bluemix上的端口设置不正确 这可以解释为什么你的应用程序在本地运行,但不在Bluemix上运行。我以前遇到过这个问题,所以我查看了配置文件,以确保所有设置都正确。验证是否可以运行和部署以下简单节点示例: 2。您可能需要增加超时时间 如果应用程序特别大,则可能需要增加超时时间。为此,请在清单中添加超时标志:
超时:例如120
如果无法访问代码,重现问题会有点困难,但请告诉我上述解决方案是否适用于您。同意joe的观点。您的日志表明您正在监听端口3000。您应该执行
var port=process.env.port | 3000代码>