views:

44

answers:

1

Hi,

I'm new to mongoDB and like it so far, I work local for my dev where I have mongo running as service on Win7. I have it allso running as a service on my VPS on Win server 2008. When I am on the server it works fine but I don't know hos to set it up so I can acces it from outside of the server? Can't find any good documentation on that. Also, I'm having hard time to do backup/restore on the server from my local computer since I can't see it from outside of the server.

I would like to have more information also on the master/slave and hos to set this up properly.

When I run netstat -anb I get

  TCP    127.0.0.1:27017        0.0.0.0:0              LISTENING
 [mongod.exe]
  TCP    127.0.0.1:27017        127.0.0.1:62990        ESTABLISHED
 [mongod.exe]
  TCP    127.0.0.1:28017        0.0.0.0:0              LISTENING

That's all I have for mongod.exe

Thanks a lot!

A: 

If you can't access it remotely it sounds like a firewall issue. By default mongod listens on port 27017. Is that port accessible from the machine you are trying to connect from? This sounds like more or a firewall issue than an issue with mongod. Can you edit your question to provice the command line the mongo service runs as.

A good source for information on replica sets in this article on Kristina Chodorow's blog.

Justin Dearing
Hi Justin, I already have port 27017 exception for the windows firewall, with TCP protocol. On localhost:27017 on the server I can see that it works but not from the outside. Mongo run as service using Mongo DB. It works fine when staying on the local server but I can't access it from the outside.
VinnyG
Is there a hardware firewall between your mongo server and the machine you are trying to access it from? Run nmap from the machine you are trying to remotely connect to your server from and see if the port is filtered. Also, what is the full command line that mongo is running with? Are you using --bind_ip? Finallyuse netstat to ensure that mongo is listening on on 0.0.0.0:27017
Justin Dearing
I run mongod.exe as a service like in this post : http://www.deltasdevelopers.com/post/Running-MongoDB-as-a-Windows-Service.aspx without the --bind_ip, do you think it could be why it's not working? When I run netstat I get nothing on port 27017.
VinnyG
That article is a bit out of date. Look at the one I wrote. http://www.justaprogrammer.net/2010/09/30/mongodb-as-a-windows-service/.
Justin Dearing

related questions