无法将Mongolab与MongodbShell连接 [英] Fail to connect Mongolab with MongodbShell

查看:87
本文介绍了无法将Mongolab与MongodbShell连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Mongo Shell与Mongolab连接.我正在使用我的mongolab用户名和密码,但出现错误:无法连接到54.81.180.188:56789."

I'm trying to connect the Mongo shell with Mongolab. I am using my mongolab username and password but it is giving an error: "Failed to connect to 54.81.180.188:56789."

我的用户名和密码正确.

My userName and password is correct.

我正在使用Windows 8.1

I'm using Windows 8.1

当我ping ds0-----.mongolab.com时工作正常.

When I ping ds0-----.mongolab.com that's working fine.


     C:\mongodb\bin>mongo ds0----.mongolab.com:56789/dbname -u "MyUserName" -p "MyPassword"
MongoDB shell version: 3.0.3
connecting to: ds027751.mongolab.com:56789/dbname
2015-06-05T10:55:30.019+0530 W NETWORK  Failed to connect to 54.81.180.188:56789, reason: errno:10061 No connection could be made because the target machine actively refused it.
2015-06-05T10:55:30.024+0530 E QUERY    Error: couldn't connect to server ds027751.mongolab.com:56789 (54.81.180.188), connection attempt failed
    at connect (src/mongo/shell/mongo.js:181:14)
    at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed

推荐答案

我遇到了同样的问题,我的服务器突然失去了连接到MongoLab的能力.我联系了支持人员,后者发送了此回复:

I had the same problem, my server abruptly lost the ability to connect to MongoLab. I contacted support, who sent this reply:

你好

您的实验性沙盒计划正在运行MongoDB 3.0.x,该计划 包括对Mongo身份验证机制的更改.这个新的 某些较新的驱动程序版本支持该机制,如所述 在 http://docs.mongodb.org/manual/release- notes/3.0-scram/#upgrade-drivers .

Your Experimental Sandbox plan is running MongoDB 3.0.x, which includes changes to Mongo's authentication mechanism. This new mechanism is supported by certain newer driver versions, as described at http://docs.mongodb.org/manual/release-notes/3.0-scram/#upgrade-drivers.

要连接到该数据库,您将需要使用其中一种驱动程序 在上面的链接中列出.

To connect to this database, you will need to use one of the drivers listed at the above link.

如果您对此有疑问,请告诉我们.

Please let us know if you have questions about this.

真诚的,参孙

我认为我已经自动升级,因为我已经几个月没有接触服务器代码或MongoLab了.作为即时解决方案,我刚刚在MongoLab中创建了一个新数据库,该数据库是在mongod v2.6.9中创建的(我不记得看到选择版本的选项了.)

I assume I was upgraded automatically, as I hadn't touched the server code or MongoLab in months. As an immediate fix, I just created a new db in MongoLab, which was created in mongod v2.6.9 (I don't remember seeing an option to choose the version).

这篇关于无法将Mongolab与MongodbShell连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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