Thursday, November 27, 2014

Bluemix troubleshooting -> A Node.js application cannot be updated by using the cf push command

You might not be able to update your Node.js applications in Bluemix if the command that is used to start the application is not specified correctly.

When you try to update your Node.js applications in Bluemix by using the cf push command, you see the error message, Instance (index 0) failed to start accepting connections.
This problem might happen if the start command is not specified.
Use the -c option to specify the start command. For example:
cf push MyUniqueNodejs01 -c "node app.js"
Note: A package.json file must be available in your Node.js application to be recognized by the Node.js buildpack.
The following example shows a simple package.json file:
{ "name": "MyUniqueNodejs01", "version": "0.0.1", "description": "A sample package.json file", "dependencies": { "express": "3.4.x", "jade": "1.1.x" }, "engines": { "node": "0.10.x" }, "scripts": { "start": "node app.js" } }
For more information about the package.json file, see package.json.

No comments:

Post a Comment