小编Bha*_*hah的帖子

无法使用MongoDB Compass连接到AWS Documentdb。没有传递sslInvalidHostName的选项

AWS DocumentDB是我们要迁移到的相对较新的服务。要从VPC外部进行连接,必须创建到现有实例的隧道。

例如:

ssh -i "ec2Access.pem" -L 27017:sample-cluster.cluster-cu52jq5kfddg.us-east-1.docdb.amazonaws.com:27017 ubuntu@ec2-34-229-221-164.compute-1.amazonaws.com -N
Run Code Online (Sandbox Code Playgroud)

然后您可以从mongo shell用以下命令连接:

mongo --sslAllowInvalidHostnames --ssl --sslCAFile rds-combined-ca-bundle.pem --username <yourUsername> --password <yourPassword> 
Run Code Online (Sandbox Code Playgroud)

您可以在以下位置查看此信息:https : //docs.aws.amazon.com/documentdb/latest/developerguide/connect-from-outside-a-vpc.html

实际上,我可以按照上述说明将shell放入document db,但无法使用MongoDB指南针连接到它。我们需要能够为我们的非开发人员团队做到这一点。

amazon-ec2 amazon-web-services mongodb-compass aws-documentdb-mongoapi

3
推荐指数
2
解决办法
1830
查看次数