Mongoshell无法连接到Cosmos DB

时间:2019-03-25 00:17:20

标签: azure ssl azure-cosmosdb mongo-shell azure-cosmosdb-mongoapi

我正在尝试迁移引用此演示(https://azure.microsoft.com/en-us/resources/videos/using-mongodb-tools-with-azure-cosmos-db/)的数据,并且无法通过mongo shell连接到cosmos。

我怀疑它与SSL或服务器/外壳版本有关,但我不清楚解决方法是什么。我将演示放在T后面,并通过了--sslAllowInvalidCertificates选项和auth凭据,并在正确的目录中执行。

这是我在mongoshell中看到的内容,请提供有关故障排除提示的建议。

1]

2 个答案:

答案 0 :(得分:0)

您可以尝试将mongo db版本降级为3.4.X。

enter image description here

然后按照视频中的步骤操作,并获取mongo shell连接字符串。

enter image description here

连接成功。

enter image description here

此外,您可以参考这种情况:Mongo shell can not connect to Azure CosmosDB

Mongo DB 4.0版本无法完成相同的步骤,您可以提交反馈here以获得comsos数据库团队的正式答复。

答案 1 :(得分:0)

从MongoDB站点下载的v3.2的默认版本将不支持SSL(不知道为什么)。您需要从OS下拉框中选择Windows 64位版本(下面的屏幕截图)以获得SSL支持。

另一种验证方式是msi可执行文件名称包含ssl(即https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.2.22-signed.msi

enter image description here

相关问题