Error while connecting to the monogdb

I am getting this error can anyone help?

Error: querySrv ETIMEOUT
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17) {
errno: undefined,
code: ‘ETIMEOUT’,
syscall: ‘querySrv’,
hostname: ‘’
Here is the screenshot of that

Hey @Harshil_K_Dangar_20BECE30024,

Welcome to the MongoDB Community!

It seems like the DNS issue, try using Google’s DNS and 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.


solved the error by downgrading the node version as you can see below and everything is working fine

1 Like