Rama Siva
Rama Siva

Reputation: 21

Bluemix - error connecting loopback starter with mongoDB compose

I am trying to setup the loopback starter app on Bluemix with MongoDB. I have set up the MongoDB instance in Compose. However, when I keep getting a connection error even though I have followed all instructions and can even connect using the mongo shell.

{ [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' }

Upvotes: 1

Views: 281

Answers (2)

Rama Siva
Rama Siva

Reputation: 21

I was able to solve the problem by using the following configuration format in datasources.json:

"mongoDs": {
  "host": "candidate.53.mongolayer.com",
  "port": 10852,
  "database": "SiteRite",
  "username": "xxxx",
  "password": "xxxx",
  "name": "mongoDs",
  "connector": "mongodb"
}

NOT using the 'url' key and using 'host' and 'port' with a separate 'username' and 'password' for the database is what seemed to have fixed it.

Upvotes: 1

Crescenzo Migliaccio
Crescenzo Migliaccio

Reputation: 1249

Take a look here: http://www.technicaladvices.com/2015/10/06/deploying-your-existing-strongloop-application-to-ibm-bluemix/

It shows the details of deploying a "StrongLoop" app in IBM Bluemix.

If the issue is still there open a support request directly from your Bluemix console or you can open a new ticket here: https://support.ng.bluemix.net/gethelp/

Upvotes: 1

Related Questions