2

Followup from both Can't connect to MongoDB server on Google Compute Engine from second VM instance and Cannot connect to mongodb using machine ip .

Editing mongod.conf to change to bind_ip=0.0.0.0 (or any other address) fails to be picked up and mongo will only listen to 127.0.0.1.

However, if I systemctl stop mongodb.service and then mongod --bind_ip 0.0.0.0 (or any safer address) then it runs just fine and my remote instances are able to connect.

Why does this happen, and more practically.. how can I get my Ubuntu to do this on boot without me having to manually start up mongo?

Community
  • 1
  • 1
Taelia
  • 591
  • 3
  • 20

0 Answers0