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:
123456 |
2015-03-09T20:39:20.172+0800 2015-03-09T20:39:20.172+0800 warning: 32-bit servers don‘t have journaling enabled by default . Please use --journal if you want durability. 2015-03-09T20:39:20.172+0800 about to fork child process, waiting until server is ready for connections. forked process: 14229 ERROR: 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--linuxdel/data/mongodb/mongo.lock--windows
Re-execution:
Start:
/usr/local/mongodb$/usr/local/mongodb/mongod-dbpath=/data/mongodb--fork--port 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.