Before the start of MongoDB is normal, do not know the start error later, the paste out query. Finally know is due to their abnormal shutdown caused by this situation.
--Excerpt: MongoDB abnormal shutdown after repair record
Mongod no background execution, after the terminal connection is not properly disconnected, perform the Mongod error again, as follows:
2015-03-09t20:39:20.172+0800 2015-03-09t20:39:20.172+0800 warning:32-bit servers don ' t has journaling enabled by Default. Please use the--journal if you want durability.2015-03-09t20:39:20.172+0800 on to fork child process, waiting until server Is connections.forked Process:14229error:child process failed, exited with error number 100
Repair method:
This is a mongod startup of a common error, the illegal shutdown, the lock file did not kill, the second boot when the check to have the lock file, the error is reported.
Workaround: Enter the data directory specified when the Mongod was last started--dbpath=/data/mongodb
Delete the file:
Rm/data/mongodb/mongo. Lock --/data/mongodb/mongo. Lock --windows
Re-execution:
./mongod --repair
Start:
27017 --logpath=/usr/local/mongodb/log/work.log--logappend--auth
OK, problem solved.
method to properly close Mongod: Enter MONGO shell
Use Admindb.shutdownserver ()
It can also be brutally killed according to the document, and it should have a kill signal handler inside it.
Killall Mongod
Please do not kill-9, will cause file data confusion lost repair also powerless.
CTRL + C can exit the MONGO interface or ext
There was a problem when the mongodb-started.