The following errors can prevent the nodeBB application to run on Bluemix.
1) If the credential to Compose for Redis is not setup correctly OR the Compose of Redis is unavailable in Bluemix
For the Redis connection to setup properly create a Compose for Redis service in Bluemix. Then Copy the Redis credentials from the service credentials as shown below.
{
"db_type": "redis",
"name": "bmix_dal_yp_94747ceb_7c86_4319_b7be_88c2e9c829eb",
"uri_cli": "redis-cli -h sl-us-dal-9-portal.0.dblayer.com -p PORT -a PASSWORD”,
"deployment_id": "583e1bea52de460017000124",
"uri": "redis://admin: PASSWORD@sl-us-dal-9-portal.0.dblayer.com:PORT”
}
PORT represents Redis port number and PASSWORD represents Redis password
Use the credentials to update the config.json correctly when you run command ./nodebb setup [ on Unix or Mac]
Make sure Compose for Redis service is up and running. Otherwise you will get connection errors from the nodebb application when you start it.
2) If the port that the nodebb application can listen on Bluemix is not updated to app.js before pushing the application to Bluemix then it will cause the application to fail to start on Bluemix.
Update
nconf.set('port', urlObject.port || nconf.get('port') || nconf.get('PORT') || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567);
TO
nconf.set('port', process.env.VCAP_APP_PORT || urlObject.port || nconf.get('port') || nconf.get('PORT') || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567);
3) Make sure that the application runs on the local machine without any errors before pushing it to the Bluemix. Command : ./nodebb start OR node app.js
The instruction to setup and run nodeBB on local can be found here ttps://docs.nodebb.org/en/latest/installing/os/osx-mavericks.html