MongoDB: ERROR: child process failed, failed with error number 14

I am running MongoDB on Mac:

Shave:mongodb_simple Logan$ ./bin/mongod -f conf/mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 5110
ERROR: child process failed, exited with error number 14

Is it because I disabled it incorrectly?

+6
source share
7 answers

This is because you did not configure your instance mongodcorrectly in the configuration file that you passed to the parameter -f. Return your configuration file and verify that eveything is configured correctly.

+2
source

You started and probably turned off the mongo incorrectly.

1. START MONGODB

To run the mongo in the background: mongod --dbpath /data/db --fork --logpath /dev/null.

  • /data/dbis the location of db. If you have not created one yet => type:mkdir /data/db
  • --fork means you want to run mongo in the background - deamon.
  • --logpath /dev/null , - , /dev/null , /var/log/mongo.log

2. TO SHUTDOWN MONGODB

, : mongo, use admin db.shutdownServer(). mongoDB

- , .

  • mongodb PID, : lsof -i:27017, , mongodb 27017
  • kill <PID>, <PID> , .
+10

ulimit, mongo .

ulimit -n 10000.

, , mongo, , . /var/log/mongo.log, mongo.

+1

:

sudo rm -rf mongod.lock
export LC_ALL=C

sudo mongod --fork --config /xxxx/xx/mongod.conf --logpath /xxx/log/mongodb/mongodb.log
+1

, , SSL- . date --set "<DD M Y H:M>"
, mongodb

0

mongodb /var/lib/mongodb/ :

chown mongodb:mongodb -R /var/lib/mongodb/
0

GCP Compute Engine.
Google , , , MongoDB (jira-link)

Linux, , mongod, , mongod .

:

  1. (ref):
sudo apt-get install language-pack-XX
  1. (ref):
sudo update-locale
  1. If the above does not work (this is not for me), just add the following to the file in /etc/default/locale( ref ):

LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
  1. Just to marvel at the lack of these constant warnings that LC_ALL is not set, do the following:
sudo dpkg-reconfigure locales

That's it, your MongoDB instance should be fine!

0
source

All Articles