MongoDB get error as an the target machine actively refused it [duplicate]

人盡茶涼 提交于 2019-12-11 02:15:32

问题


i'm newbie in mongodb and after installing mongo installer package on windows i get this error when i try to use mongo on shell and command prompt. i can not find any solution for this problem:

C:\Program Files\MongoDB 2.6 Standard\bin>mongo
MongoDB shell version: 2.6.7
connecting to: test
2015-02-20T16:43:11.971+0330 warning: Failed to connect to 127.0.0.1:27017, reas
on: errno:10061 No connection could be made because the target machine actively refused it.
2015-02-20T16:43:11.987+0330 Error: couldn't connect to server 127.0.0.1:27017 (
127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed

C:\Program Files\MongoDB 2.6 Standard\bin>

回答1:


You have to make sure that mongod is up and running.

Another probable cause would be that the port is not open.

I've come across the following thread on SO with multiple possible solutions to your problem --- LINK



来源:https://stackoverflow.com/questions/28629917/mongodb-get-error-as-an-the-target-machine-actively-refused-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!