node:internal/errors:496
ErrorCaptureStackTrace(err);
^
Error: querySrv ETIMEOUT _mongodb._tcp.nodetut.hvyffwg.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17) {
errno: undefined,
code: 'ETIMEOUT',
syscall: 'querySrv',
hostname: '_mongodb._tcp.nodetut.hvyffwg.mongodb.net'
}
Node.js v20.5.1
[nodemon] app crashed - waiting for file changes before starting...
Hey @sadiq_abdulwahab,
Welcome to the MongoDB Community!
It seems like the DNS issue, try using Google’s DNS 8.8.8.8
and 8.8.4.4
. Please refer to the Public DNS for more details.
Apart from this, please refer to this post and try using the connection string from the connection modal that includes all three hostnames instead of the SRV record.
If it returns a different error, please share that error message here.
In addition to the above, I would recommend also checking out the Atlas Troubleshoot Connection Issues documentation.
Best regards,
Kushagra