MongoDB收到错误,因为目标计算机主动拒绝它 [英] MongoDB get error as an the target machine actively refused it

查看:80
本文介绍了MongoDB收到错误,因为目标计算机主动拒绝它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是mongodb中的新手,在Windows上安装mongo installer软件包后,当我尝试在shell和命令提示符下使用mongo时出现此错误.我找不到此问题的任何解决方案:

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>

推荐答案

您必须确保mongod已启动并正在运行.

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

另一个可能的原因是端口未打开.

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

我在SO上遇到了以下线程,并针对您的问题提供了多种可能的解决方案---

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

这篇关于MongoDB收到错误,因为目标计算机主动拒绝它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆