Running Errors for mongo/d on Mac High Sierra

I’m a student trying to run mongodb on my Mac High Sierra 10.13.6. My mongodb version is v4.4.21. When I try to run mongo/mongod I get the following errors for each.

When I try to run mongo this is the error I get:

Book-Pro:~ aerodynamictapeworm$mongo
MongoDB shell version V4.4.21
connecting to: mongodb://
Error: couldn’t connect to server,
connection attempt failed: Socketexception: error connecting to :: caused by :: connection refused:
exception: connect failed exiting with code

When I try to run mongod, I get a very long list of processes, as if it’s starting up, but then I get the following message, and it shuts the program down again (snippet):

Here is the configuration:

destination: file path: /us/local/var/log/mongodb/mongo. log logAppend: true
dbPath: /usr/local/var/mongodb
bindIp:, ::1
IPv6: true

Data directory /data/db not found.

The error above is most likely what is causing the mongod instance to terminate upon starting.

What is the actual / full mongod command you’re using to start up the mongod instance? From the error, it looks like there is no /data/db directory found for the data directory. I understand you’ve specified the configuration file contents which contains a different dbPath value so I assume you’ve started the mongod instance without the configuration file - To learn more on using the configuration file please see the following Configuration File Options documentation.



This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.