Solutions to common MongoDB errors

Source: Internet
Author: User

Solutions to common MongoDB errors

After MongoDB was installed today, the service cannot be started this morning. The following error occurs:

Error:

Error 2: the specified file cannot be found.

Thinking process:

During the test yesterday, I installed MongoDB twice, and then I deleted (note not to uninstall) A MongoDB folder. is the default MongoDB installation address incorrect for this service?

View the Service Attributes. The Mongo address is the address that has been deleted, rather than the address currently used. The current address is: E: \ Program files \ mongodb \ bin

Solution:

First uninstall the original installation and then install the new one.

Mongo uninstall:

Uninstall: mongod.exe -- remove -- serviceName "MongoDB"

Install MongoDB as a service:

Installation: mongod.exe -- install -- logpath = "E: \ Program files \ mongodb \ data \ log \ log.txt" -- dbpath = "E: \ Program files \ mongodb \ data \ db"

After installation, refresh the service and change the address:

Restart the MongoDB service again. startup failed with error 1607.

Error:

Error cause: Unknown

Solution:

Delete the mongod. lock file in the E: \ Program files \ mongodb \ data \ db directory.

Restart the service again and start successfully.

Summary:

When you get in touch with a new thing, errors may inevitably occur. If a mistake comes, you can solve it. Don't hide and drag it.

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.