2

I'm new to MongoDB. I'm trying to connect to my remote mongo database from my work machine( I tried for both mongohq as well as mongolab). I'm getting the error listed below. When I run the same command from my home machine it runs fine and does connect to remove mongo database. I'm not sure what is messed up on my work machine but I'd like to fix it. Thanks for you help.

MongoDB shell version: 2.4.9
connecting to: linus.mongohq.com:10097/mydb
Thu Jan 16 04:16:02.689 Error: couldn't connect to server linus.mongohq.com:10097
at src/mongo/shell/mongo.js:147 
exception: connect failed
sublime
  • 4,013
  • 9
  • 53
  • 92
  • 2
    Hi, for your MongoLab database you can try following the steps in this troubleshooting doc: http://docs.mongolab.com/connecting/#help. Feel free to write in at support@mongolab.com and we'll be happy to help you out! -Chris@MongoLab – Chris Chang Jan 16 '14 at 04:46
  • I followed the steps on the given wiki and I got this error nc: connect to ds061318.mongolab.com port 61318 (tcp) failed: Connection refused – sublime Jan 16 '14 at 09:29
  • Can you ask your network admin to see if port 61318 is blocked? – Chris Chang Jan 16 '14 at 18:47
  • No, we don't have a network admin as such. Is there anyway I can debug this and solve this? – sublime Jan 16 '14 at 18:55
  • 1
    in that case you'll have to work with your local ISP to enable connectivity. should be a network problem, as opposed to your home vs work machine – Chris Chang Jan 17 '14 at 21:08

1 Answers1

3

As per question comments, your mongo shell client can't connect to the mongo instance. Assuming that your internet connectivity is fine, the most common reason for the failure is that the ports are blocked on your network.

Some ISPs automatically block these ports by default as an additional security protection for users that don't need them open. Contact your ISP or network admin, they should be able to help you out.

AndrewW
  • 678
  • 6
  • 18