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:
Then execute:
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