Mongodb deploy server startup shutting down

When running the mongod command in terminal after setting the configuration file using <mongod --config /usr/local/etc/mongod.conf> I get the following output:

I don’t understand all of the messages but one indicates the address is already in use - I then found the mongod pid on my Mac and killed it in the hope that would free it up to run smoothly. This did not work.

Any help much appreciated, thank you.

This is the contents of my configuration file:

By doing

you started an instance of mongod listening at port 27017 of local host per your configuration file.

By doing mongod as shown on your screenshot, you are starting another instance of mongod listening at the default port of 27017 and the default local host.

This would indeed generated the Address already in use error.

You would always want to terminate mongod in a gentle way. Try to start again without any parameter. You will most likely get another error. Something along the way of pid file existing or lock file existing.

1 Like

Doesn’t seem to have made any difference unfortunately.

Always check the error messages (marked with “s”:“E”).

It says: NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the ‘storage.dbPath’ option in your configuration.

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