Tag Archives: Mongodb startup error

[Solved] MongoDB Startup Error: Unrecognized option: storage try ‘mongod –help’ for more information

Problem Description:

Today, when mongodb is started by using the configuration file method, it always fails to start, and an error is displayed: unrecognized option: storage try ‘mongod — help’ for more information

This is due to the configuration error of the configuration file. Two spaces need to be added at the beginning of the second and third lines of the file content, as shown in the following figure:

[Solved] Mongodb startup error: about to fork child process, waiting until server is ready for connections.

Mongodb startup error report

MongoDB-problem occurred during startup
Repair method

MongoDB- problem occurred during startup  mongod is not executed in the background, after the terminal connection is abnormally disconnected, execute mongod again to report an error

Repair method

This is a common error in Mongod startup. The lock file was not killed when it was shut down illegally. When the lock file was checked for the second startup, this error was reported.

Solution: Enter the data directory specified when mongod was started last time –dbpath=/data/mongodb and

delete the file:

1
rm /data/db/mongo.lock

Then execute:

1
./mongod --repair

OK, the problem is solved.

The correct way to close mongod: enter the mongo shell

1
2
use admin
db.shutdownServer()

Please don’t kill -9, it will cause confusion and loss of file data. Repair will also be unable to recover.
ctrl+c can exit the mongo interface or ext