I’m new to MongoDB Atlas and have been struggling with a persistent error for quite some time now. Despite my efforts to find a solution, I haven’t been successful, and it’s becoming increasingly frustrating. I would like to emphasize that when I connect to my home Wi-Fi, everything works fine without any issues. However, when I try to connect using my phone’s hotspot or any other Wi-Fi network, I encounter this error consistently.
Error al conectar al cliente migueltejera_ecommerce Error: querySrv ECONNREFUSED _mongodb._tcp.cluster-mt.d1yad.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:254:17) {
errno: undefined,
code: 'ECONNREFUSED',
syscall: 'querySrv',
hostname: '_mongodb._tcp.cluster-mt.d1yad.mongodb.net'
}
I have already configured my Network Access to 0.0.0.0/0 (including my current IP address) and have attempted various troubleshooting steps, but none of them have yielded positive results.
If someone could kindly assist me with this problem, I would greatly appreciate it. I am using Node.js for my application.
I recommend checking if there are any firewall or network restrictions on the Wi-Fi networks where the error occurs. However, 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 response 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.
I sincerely appreciate your prompt response. I wanted to inform you that I have managed to find a solution to the connection problems I was experiencing. Although I’m not entirely sure how it started working, I tried numerous troubleshooting steps and eventually achieved success. However, I am still encountering issues with my phone hotspot. It seems that there might be a connection between my phone’s firewall settings or dynamic IP configuration and this problem. Rest assured, I will continue my efforts to resolve this.
Once again, I extend my heartfelt gratitude to you for your assistance. I will certainly update you if I am able to establish a connection using my phone.