There was a problem when the mongodb-started.

Source: Internet
Author: User
Tags signal handler mongo shell

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.