我在尝试连接蒙古包时遇到了这个错误。如Pyo-8中提到的其他答案。在
connection=MongoClient("mongodb://usr:pass@host:port/data")
堆栈跟踪:
^{pr2}$我也尝试过用命令行访问它,但失败了。在
mongo ds031711.mongolab.com:31711/data -u <dbuser> -p <dbpassword>
堆栈跟踪:
MongoDB shell version: 3.0.5
connecting to: ds031711.mongolab.com:31711/data
2015-10-02T10:40:21.662+0530 W NETWORK Failed to connect to 54.159.76.238:31711
, reason: errno:10061 No connection could be made because the target machine act
ively refused it.
2015-10-02T10:40:21.670+0530 E QUERY Error: couldn't connect to server ds0317
11.mongolab.com:31711 (54.159.76.238), 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
URI和用户名、密码正确。在
目前没有回答
相关问题 更多 >
编程相关推荐