I am getting the Error An error occurred while loading instance info: connection 3 to 13.x.x.x:27017 closed.
I am using the MongoDB drive for node js mongodb.
how to resolve this Error !.
I am getting the same Error with MongoDB compass also. after many re-try it worked. but not the right solve.
Welcome back to the MongoDB Community
Can you share the following information to better understand the problem:
- The logs from the server instance so we can see what’s going on from the server side.
- Have MongoDB successfully running before? If yes, what changed?
- How did you install MongoDB, and what version is this?
- What is your hardware and OS spec?
Could you specify the changes you made in order to make it work?
@Kushagra_Kesav I am using Atlas M2 Instance. this Error went after accessing all networks. when I set it up with my public IP it was giving the connection Error. but I can query data. So any wrong with the network access setup?
Could you share the actual error message from your app and MongoDB Compass? Additionally, it would be helpful if you could share the connection string you are using.
Also, have you contacted MongoDB Atlas Support for assistance with this issue?
@Kushagra_Kesav here is the connection string. mongodb+srv://usernamev:password@cluster0.XXXvz2i.mongodb.net/?retryWrites=true&w=majority.
the Error “connection 1 to 184.108.40.206:27017 closed” this Error show in mongo compass.
Thanks for sharing the connection string.
Can you please confirm the following:
- Is the client attempting to connect the machine associated with the public IP address you added or is it running in a VM on the said machine?
- Are you able to connect properly when “Allow Access From All IP Addresses” /
0.0.0.0/0 is added to your Network Access List.
Also, can you verify that your current IP address is whitelisted (
includes your current IP address) in the MongoDB Atlas Dashboard?