MONGO Database start error

Source: Internet
Author: User

The error message is as follows:

[Email protected] bin]# MONGO
MongoDB Shell version V3.4.6-22-ga109a23
Connecting to:mongodb://127.0.0.1:27017
2017-10-16t10:57:28.624+0800 W NETWORK [Thread1] Failed to connect to 127.0.0.1:27017, in (checking socket for error after Poll), Reason:connection refused
2017-10-16t10:57:28.625+0800 E QUERY [thread1] error:couldn ' t connect to server 127.0.0.1:27017, connection attempt faile B |
[Email protected]/mongo/shell/mongo.js:237:13
@ (Connect): 1:6
Exception:connect failed

Workaround:

1. Go to the/data/db directory and delete the Mongo.lock file

2. Enter the/mongodb/bin directory and execute the./mongod

3. Re-open a window to execute./mongo--dbpath=/data/platform/mongodb/data/db/

Note that the DB path is added to the boot, otherwise the startup fails. You also need to consider permissions issues.

4. Start successfully

MONGO Database start error

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.