我无法从我的亚马逊 EC2 ubuntu 机器连接到我的 Amazon DocumentDB?我检查了 Amazon DocumentDB 的安全性,它当前被分配给具有“所有流量”的默认值。
尽管我收到了下面包含的错误消息,但我直接从 AWS 实例页面尝试了以下命令。
我已遵循此 aws 指南https://docs.aws.amazon.com/documentdb/latest/developerguide/getting-started.connect.html
来自 EC2 ubuntu 机器的 Mongo shell 命令
mongo --ssl --host mydatabasename.23scnncsd3.eu-west-1.docdb.amazonaws.com:27017 --sslCAFile rds-combined-ca-bundle.pem --username webuser --password mypassword
我从 ubuntu 命令提示符中收到的错误消息如下
错误信息
MongoDB shell version v3.6.11
connecting to: mongodb://mydatabasename.23scnncsd3.eu-west-1.docdb.amazonaws.com:27017/?gssapiServiceName=mongodb
2019-03-11T21:39:37.587+0000 W NETWOK [thread1] Failed to connect to 172.31.45.184:27017 after 5000ms milliseconds, giving up.
2019-03-11T21:39:37.595+0000 E QUERY [thread1] Error: couldn't connect to server mydatabasename.23scnncsd3.eu-west-1.docdb.amazonaws.com:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:263:13
@(connect):1:6
exception: connect failed
难道我做错了什么?任何帮助表示赞赏!
非常感谢,
更新