Getting error when trying to open mongo in MAC OS
Can you check if mongod
is running and try to ping 127.0.0.1
- Check if mongod is running:
ps -ef | grep "[m]ongo"
- Ping that IP from the terminal:
ping 127.0.0.1
Getting this in mongod
Run the first command I gave you and let’s see the result. Don’t run mongod.
Try: ps -ef | grep mongo
Ok. Mongod is definitely not running.
Test the port on your browser and let’s see the result:
http://portquiz.net:27017
It should look like this:
I should have noticed the error message
You need to create the directory /data/db and give it the right permissions. Was this not explained in the lecture? I didn’t take this particular course that’s why I’m asking.
no, it was . not explained. Can you please suggest some url
Website that explains what exactly?
Hi @Gaurav_88483,
Mongo is throwing an error because there is no mongod instance running on your system.
The logs in the screenshot says the directory for the DB path is non existent. This is strange because if you are launching the default mongod instance running on port 27017 then WiredTiger Storage Engine creates that for you.
Can you please share the command that you used to launch the mongod instance along with the output ?
Thanks,
Shubham Ranjan
Curriculum Support Engineer