无法连接到MongoDB Atlas群集:DNSHostNotFound

问题描述 投票:0回答:1

我在MongoDB Atlas中创建了一个新集群,但无法通过mongo shell连接到它。

C:\git_symphony\esp8266\SymphonySocket>mongo "mongodb+srv://<clustername>-gy7bf.azure.mongodb.net/test"  --username <USERNAME>
DNSHostNotFound: Failed to look up service "":No records found for given DNS query.
try 'mongo --help' for more information

我尝试过切换区域,但是没有用。我也尝试在Mac上使用Compass,但是当我尝试连接时它将无限期加载。可能有什么问题吗?

mongodb dns
1个回答
0
投票

您是否已将IP地址列入白名单? IP白名单很重要,否则它将无法连接。

© www.soinside.com 2019 - 2024. All rights reserved.