Search code examples
ibm-cloud

CF push to Bluemix failed


I tried to push a Node.js app to Bluemix. The app worked fine on my Mac but did not start for some reason on Bluemix.

The Bluemix log contains some errors:

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

Attaching the configuration files:

1. manifest.yml

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

and 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"
  }
}

Hope that helps.


Solution

  • There are a number of things that could be the issue, but here is what I think are probably the most likely causes:

    1. Your port is not being set correctly on Bluemix

    This would explain why your app runs locally, but doesn't run on Bluemix. I have had this issue before, so I looked through my configuration files to make sure that everything was set correctly. Verify you can run and deploy a simple Node example like this:

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

    2. You may need to increase the timeout

    If you application is particularly large, you may need to increase the timeout. To do that add a timeout flag in your manifest:

    timeout: 120 for example

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


    Without access to the code, it will be a little difficult to reproduce the problem, but let me know if the above solutions work for you.