MDB报错:about to fork child process, waiting until server is ready for connections. forked process:XX

After installing MongoDB, the project started abnormally and reported an error. The general content is:

[root@luntek mongodb]# ./bin/mongod --config /home/mongodb/mongodb.conf 

about to fork child process, waiting until server is ready for connections.
forked process: 25486
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the "--fork" option.



Solution:

Solution 1:

After mongodb is shut down abnormally, restarting will generate an exception about to fork child process, waiting until server is ready for connection.

Delete the mongod.lock file in the db directory of mongodb and restart mongodb. The file will be generated under the log file (at the same level as the bin directory). After the cd log file, the rm command deletes the mongod.lock file
Insert picture description here

Solution 2: The
first way is to solve most errors on the Internet, lz is this way.
The reason is that the mongodb.conf configuration file path in the same directory of MongoDB is misconfigured, so the error is caused. The following error is
Insert picture description here
found to solve the problem and it is very simple. Enter the storage path and log path of the file in the configuration file The configuration is correct, as shown below

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_42910468/article/details/103076136