0

I have already tried it with the following thread but it didn't help me:
ERROR: child process failed, exited with error number 1,mongodb
Tried that:
sudo mongod --fork --config /etc/mongod.conf --logpath /var/log/mongodb/mongod.log
Result:

forked process: 2887
ERROR: child process failed, exited with 48
To see additional information in this output, start without the "--fork" option.

Tried the following as well:
sudo systemctl start mongod
One of the lines in the error message say:
ERROR: child process failed, exited with 14

Would appreciate any help. mongod was working pretty well until I have started trying to implement a replica set.

notAnExpert
  • 123
  • 1
  • 5
  • 15
  • What do you have in the log `/var/log/mongodb/mongod.log`? What do you get when you start without `--fork`? (like advised in the error) – Wernfried Domscheit Apr 20 '21 at 15:56
  • Check out [mongo db (mongodb.service) failed, status 14](https://stackoverflow.com/questions/53469608/mongo-db-mongodb-service-failed-status-14) – Joe Apr 21 '21 at 07:36

1 Answers1

0

Use this command on the terminal:

sudo mongod --dbpath /System/Volumes/Data/data/db 

It should start the MongoDB server and allocate a port for it. You can exit out of the server and then try the command again and it should work.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77