I have created a MongoDB instance on an AWS EC2 Ubuntu instance.
MongoDB is running and when I ssh into the machine and run the MongoDB mongod console, I am able to create databases, so I am confident it is running successfully.
However, I am not able to gain access to the database from my local machine in a browser.
I have changed the bindIp in /etc/mongod.conf to 0.0.0.0, and I have opened port 27017 by executing sudo ufw allow 27017 but my browser still times out trying to connect.
When I try to configure the instance using mongod --config /etc/mongod.conf, I get the error:
CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongod.log"
This file exists! The relevant portion of the config file looks like this:
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
I have read that you have to enable the REST interface by specifying --rest, but I don't know how to do this since I am starting the database service with the sudo service mongod start command.
My AWS security settings looks like this:
What am I missing?
