Jeremy D
Jeremy D

Reputation: 4855

Heroku and mongoHQ: Connection failed

I have the following environment variable on Heroku :

MONGOHQ_URL: mongodb://heroku:password%40mongohq%2Estaff%2Ecom:10056/app6186345

Originally the error was :

Database name cannot contain '.'

I escaped '.' and '@'and I still have the same result, a connection failed but with the message :

[Error: failed to connect to [heroku:27017]]

What am I doing wrong?

When I checked the documentation about mongoHQ, nothing is said about escaping caracters or something equivalent.

Upvotes: 0

Views: 723

Answers (1)

blu
blu

Reputation: 13175

It looks like you may have reversed the subdomain and domain name for mongohq on accident.

It should be @staff.mongohq.com instead of @mongohq.staff.com

Upvotes: 2

Related Questions