【问题标题】:MongoDB get error as an the target machine actively refused it [duplicate]MongoDB得到错误,因为目标机器主动拒绝它[重复]
【发布时间】:2017-07-03 06:35:44
【问题描述】:

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

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>

【问题讨论】:

    标签: mongodb nosql


    【解决方案1】:

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

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

    我在 SO 上遇到了以下线程,有多种可能的解决方案来解决您的问题 --- LINK

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-26
      • 2021-12-03
      • 2013-05-02
      相关资源
      最近更新 更多