0

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.

Jeremy D
  • 4,787
  • 1
  • 31
  • 38

1 Answers1

2

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

blu
  • 12,905
  • 20
  • 70
  • 106
  • Yes, I agree. That is the issue that you are seeing. I am not sure why it would be working via mongoshell. Can you share output? – Jason McCay Jul 30 '12 at 22:02