0

I have installed mongo DB on window server that is accessible on localhost:27017 but not accessible on 35.x.x.x:27017.

I checked:

27017 Port is open. mongoDB is running.

output of: netstat -anb | findstr :27017

TCP    127.0.0.1:27017        0.0.0.0:0              LISTENING
TCP    127.0.0.1:51186        127.0.0.1:27017        TIME_WAIT

my mongos.conf file is

dbpath = d:\MongoDB\Database
logpath = d:\MongoDB\Logs\log.txt
noauth = true # use 'true' for options that don't take an argument
bind_ip=0.0.0.0
2
  • Clearly it's not listening on the 35.* address.
    – mustaccio
    Jun 12 '18 at 12:42
  • Hi Shubham Batra, and welcome to dba.stackexchange. Can I make an observation: your mongos.conf file seems to be using the very old pre-YAML format, but since version 2.6 the YAML format has been standard. Do you have the option change your config file to use the YAML format, with the bindIp flag? Jun 14 '18 at 12:43
1

The answer is simple, you have a typo at your config. There should be bindIp and not bind_ip.

2
  • The conf file seems to be using the pre-YAML legacy format, which specifies bind_ip. However, that guidance is so old that I wouldn't be confident in it working that way in the current MongoDB version. Jun 14 '18 at 12:42
  • @VinceBowdren you are absolutely right, I had already forgotten 2.6 config file format.. :-)
    – JJussi
    Jun 14 '18 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.