Error: querySrv ETIMEOUT _mongodb._tcp.cluster0.ghjqqbt.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17)
at QueryReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: undefined,
code: 'ETIMEOUT',
syscall: 'querySrv',
hostname: '_mongodb._tcp.cluster0.ghjqqbt.mongodb.net'[enter image description here](https://i.stack.imgur.com/Lpqpo.png)
字符串
通过nextjs和mongoose连接到mongo atlas时出错
[ enter image description here ](https://i.stack.imgur.com/iawsg.png)
1条答案
按热度按时间pod7payv1#
查看以下Mongodb社区论坛帖子:https://www.mongodb.com/community/forums/t/cant-connect-to-mongodb-atlas-querysrv-enotfound/127988/18
您可以尝试使用Google的DNS来查看是否有帮助,甚至可以尝试标准连接字符串格式(如果可用)。但是,如果DNS问题是导致连接失败的原因,那么尝试解决DNS问题可能会更好。