简体   繁体   中英

Mongoshell unable to connect to Cosmos DB

I'm looking to migrate data referencing this demo ( https://azure.microsoft.com/en-us/resources/videos/using-mongodb-tools-with-azure-cosmos-db/ ) and I'm unable to connect to cosmos through mongo shell.

I suspect its an issue with SSL or the server/shell versions but I'm not clear what the fix is. I followed the demo to the T and passed the --sslAllowInvalidCertificates option along with the auth creds and executed in the correct directory.

Here's what I'm seeing in mongoshell, please advise on troubleshooting tips.

1]

You could try to downgrade your mongo db version to 3.4.X.

在此处输入图片说明

Then follow the steps from the video and get your mongo shell connect string.

在此处输入图片说明

Connect successfully.

在此处输入图片说明

Also,you could refer to this case: Mongo shell can not connect to Azure CosmosDB .

Same steps can't be done with Mongo DB 4.0 version,you could commit feedback here to get the official reply from comsos db team.

The default download for v3.2 from MongoDB site will not have support for SSL (not sure why 🙂 ). You need to select the Windows 64-bit version from the OS dropdown box (screenshot below) to get SSL support.

Another way to verify is that the msi executable name contains ssl (ie https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.2.22-signed.msi )

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM