My node app gives me this message \"Could not connect to any servers in your MongoDB Atlas cluster. Make sure your current IP address is on your Atlas cluster\'s IP whitelist\"
At times, it may be due to system settings as well.
In my case it was server system's date & time, it was not updated to current date & time settings, hence the connection to db from the server was refused. Updated the same, and restart the server, connection was successful.
If the password is correct and you have allowed access from anywhere
and you still getting the same error then, The problem is with your network which has a firewall. I solved my issue by just changing the network because mine was having a firewall.