我正在尝试连接到此远程数据库
mongoURL = mongodb://blahuser:blahpassword@ds019053.mlab.com:19053/my-app
我收到此错误:
{ MongoError: failed to connect to server [ds019053.mlab.com:19053] on first connect [MongoError: connection 0 to ds019053.mlab.com:19053 timed out]
我也跑了:mongo ds019053.mlab.com:19053
并收到了这个错误:
MongoDB shell version v3.4.4
connecting to: ds019053.mlab.com:19053
2017-05-26T10:24:47.108-0400 W NETWORK [thread1] Failed to connect to 54.198.224.164:19053 after 5000ms milliseconds, giving up.
2017-05-26T10:24:47.109-0400 E QUERY [thread1] Error: couldn't connect to server ds019053.mlab.com:19053, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
然而,当我运行mongod
时,我成功连接到我的本地mongoDB并加载了我的应用程序。
知道出了什么问题吗?