Cannot connect to MongoDB Atlas Cluster: DNSHostNotFound

微笑、不失礼 提交于 2020-06-09 05:24:27

问题


I created a new cluster in MongoDB Atlas but I can't connect to it thru the 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

I tried switching regions but it didn't work. I've also tried using Compass on my mac but it just loads indefinitely when I try to connect. What could possibly be wrong?


回答1:


  • Have you whitelisted your IP address ? IP whitelisting is important otherwise it will not connect.
  • Have you created this cluster recently and is it in the europe region ?
  • Is the cluster properly deployed or you are experiencing any issue in the deployment of the cluster ?



回答2:


Turns out, my ISP blocks all connections to MongoDB for some reason. I haven't contacted them yet, but I find this very silly as I racked my brains out trying to solve this when the problem wasn't at all in my control.



来源:https://stackoverflow.com/questions/60784313/cannot-connect-to-mongodb-atlas-cluster-dnshostnotfound

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!