mongodb2014-07-25t11:00:48.634+0800 warning:failed to connect to 127.0.0.1:27017, reason:errno:1

Source: Internet
Author: User
Tags mongodb

1: Start MongoDB

2014-07-25t11:00:48.634+0800 warning:failed to connect to 127.0.0.1:27017, reason:errno:10061 cannot connect because the target computer is actively rejecting.

2: Add a configuration file

# #数据文件
dbpath=e:\ruanjian\mongodb\data
 
# #日志文件
logpath=e:\ruanjian\mongodb\log\mongo.log

Add the appropriate directories and files, as shown in the following illustration

3:

C:\users\gechong>mongod.exe--config E:\ruanjian\MongoDB\mongo.config

4: Login to MongoDB


In addition: In one case, this error message is also generated, that is, the non-normal shutdown of the MONGO database service. In this case the system will generate a lock file, then we just need to delete the lock file is good, the workaround is: under your database folder there is a. lock extension file, delete him just fine.

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.