【问题标题】:AWS DocumentDB with Robo 3T (Robomongo)AWS DocumentDB 与 Robo 3T (Robomongo)
【发布时间】:2019-06-20 09:48:18
【问题描述】:

我想将我的 Mac 笔记本电脑上的 Robo 3T(以前称为 robomongo)与 AWS 的 DocumentDB 连接起来。我遵循了许多教程,但是找不到任何特定于 DocumentDB 的教程。

在测试阶段,它通过了第 1 步“连接到我的 EC2 实例”,但在第 2 步失败,并显示消息“无法通过 SSH 隧道连接到 ...docdb.amazonaws.com:27017”。有没有人能让这个工作?

【问题讨论】:

标签: amazon-web-services aws-documentdb-mongoapi


【解决方案1】:

从 Robo 3T 连接的步骤

 1. Host : localhost and 28017: source port that we mentioned in ssh
    tunnel
 2. Authentication tab - Database : DBname; Username and password of
    the documentDb
 3. In SSL tab, click Use SSL protocol
 4. Click use CA certificate
 5. Import the CA certificate in .pem format. Download it from this link
    : https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
 6. Click on Advanced options and keep Invalid hostnames : Allowed
 7. Give a name for the connection and hit connect button.
 8. Connection should be established by now.

我假设您对 SSH 隧道使用以下命令。

ssh -i "ec2Access.pem" -L 28017:sample-cluster.cluster-cu52jq5kfddg.us-east-1.docdb.amazonaws.com:27017 ubuntu@ec2-34-229-221-164.compute-1.amazonaws.com -N 

希望这会奏效。

【讨论】:

  • 谢谢。我不得不做一些额外的环境特定设置,但最终让它工作。
  • 唯一缺少的步骤是 Allow Invalid Hostnames
  • @mediastream 你的额外设置是什么?
【解决方案2】:

这是我在五个屏幕截图中的配置。

【讨论】:

  • 这与来自 Arun Ramachandran 的 ssh 命令相结合使其工作。请记住,默认数据库是您的数据库的名称。这不是管理员。
【解决方案3】:

通过 macOS 上的 SSH-Tunnel,这似乎是得到的方式(之前摆弄 CA-pem 没有成功):

【讨论】:

  • 哈哈,传奇。拯救了我的一天!
【解决方案4】:

对于那些仍然遇到问题的人,https://aws.amazon.com/blogs/database/part-3-getting-started-with-amazon-documentdb-using-robo-3t/ 有详细指南

一个重要的注意事项是,用于 SSH 隧道的 EC2 和 DocumentDB 集群必须在同一个 VPC 中(如果它们打开了所需的端口(例如 22 和 27017),则不一定是同一个安全组)。此外,您应该创建一个测试数据库并插入至少一个文档,以便设置 Robo3T 连接的身份验证

“在“身份验证”选项卡上,输入集群的身份验证信息。确保使用自定义数据库名称,例如“test”或“testdb”。使用“admin”(默认设置)不适用于具有以下功能的集群的 DocumentDB没有数据库。创建第一个数据库后,您可以修改连接以使用“管理员”。”

希望对你有帮助!!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-07-22
    • 2018-12-13
    • 1970-01-01
    • 2018-08-15
    • 1970-01-01
    • 2018-02-22
    • 1970-01-01
    • 2018-05-01
    相关资源
    最近更新 更多