A workaround that MongoDB cannot start properly as a service and can be started in a shell-based manner

Source: Internet
Author: User
Tags file permissions

After running the repair I is able to start the Mongod proccessor and as root, which meant that service mongod start would isn't work. To repair this issue, I needed-make sure, the files inside the database folder were owned and grouped to Mongod . I did this by the following:

    1. Check the file permissions inside your database folder
      1. Note You need to is in your DBPath folder mine is /var/lib/mongo I went tocd /var/lib
      2. I-Ranls -l mongo
    2. This showed me-databases were owned by Root, which is wrong. I ran the following to fix this: chown -R mongod:mongod mongo . This changed the owner and group of every file in the folder to Mongod. (If using the MongoDB package, chown -R mongodb:mongodb mongodb )

I Hope this helps someone else on the future.

A workaround that MongoDB cannot start properly as a service and can be started in a shell-based manner

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.