MongoDB detailed error:10061 Unable to connect because the target computer was actively rejected

Source: Internet
Author: User
Tags log log

When you connect to MongoDB, first use Mongod.exe to start the program, then use Mongo.exe to connect to the database. However, when connecting, the error occurs: error:10061 cannot connect because the target computer is actively rejecting.


WORKAROUND: Set up the following two folders in parallel with MongoDB data and log, and then establish mongoconfig. and create a mongo.log log file under the log folder.


Later found in the configuration file, enter:

# #数据文件

Dbpath=f:\project \data

# #日志文件

Logpath=f:\project \log \mongo.log

But one thing to be aware of when setting up a configuration file is to change the extension after entering the config information in txt, if the order in turn may be wrong with the coding problem, but it doesn't matter, because Notepad error I use Notepad Plus will be garbled slightly modified on it.


After everything is done in the DOS environment, enter the path of the F:\>mongod--config Mongo.config, the return can be turned on successfully (never close the DOS window). Start the Mongo.exe program to succeed. But at the end of this is to find Mongo.exe boot, you will see the following link success prompt:


But every time it's like this. Turn on the connection advantage trouble, try to write a. bat batch file may be completed after this, expect to succeed, if successful, add in this article.

MongoDB detailed error:10061 Unable to connect because the target computer was actively rejected

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.