ETIMEOUT error while connecting from nodejs app to Atlas

Getting this error while connecting from node js application to mongodb atlas srv
“querySrv ETIMEOUT”

Temporarily turn off antivirus, firewall and vpn and test the connection string via the mongo shell.
Share the connection string for testing.

1 Like

In addition to @007_jb’s reply. please make sure that IP is whitelisted on atlas cluster.


I have included this . So it will take connection from anywhere. Still its not connecting.

Ok, i will try this. I have only disconnected from VPN.

@007_jb i still getting the same error message as mentioned in the question

Just to confirm, I suggested that you should test your connection string via the Mongo Shell. So if you’ve done that, share a screenshot.

I’m having the same problem…ETIMEOUT. I’ve used the application, Mongosh and Mongo Compass and I get the same error for each. I haven’t been able to connect for weeks and I can’t find a solution from Stackoverflow or Mongo Community. I will keep looking.

Hi @Joseph_Brown
timeouts are mostly because you do not have a connection toward your destination. besides using a wrong URI, it can be from using strict access to the server, or strict access to outside world from vpn, router, or proxy.
First, make sure you are using the correct connection string you are given, and try connecting with the mongo shell and make a note of it. then login to your Atlas cluster and give access from anywhere,, and try mongo shell again. if both fails share the error, else check your access list, and then your firewall, proxy, VPN etc.

Not using a proxy server or VPN. I just asked this question and gave the connection string at Getting ETIMEOUT error when attempting to connect