Hello. I joined this community today because I was frustrated about my first connection Prisma ORM to Mongo DB Atlas. I always get a message “An error occurred during DNS resolution: request timed out” and I never know what caused it. I have tried to turn off my firewall, refresh MongoDB services, change DNS from my connections to Google DNS, I’ve asked some developer groups on Facebook, and I’ve made a lot of effort but until now my laptop still can connect with MongoDB atlas.
Before with the same project file, I try this with my working laptop in the office but all is clear. MongoDB can’t connect to my Next JS Prisma code.
I saw some similar threads, but I couldn’t solve my problem. Could you help me, please?
Firstly, I’d like to just clarify the above, when you state “my laptop still can connect with MongoDB atlas” - Do you mean “can’t”? I just want to double check.
Additionally, it sounds like the main issue here is connection to the Atlas instance via Prisma but I would also like to know if you are able to connect locally (on your laptop for example) direct to the Atlas instance perhaps using mongosh or MongoDB Compass. At least from this we can round out what is happening here.
I am not too familiar with the full capabilities of Prisma but please advise the following:
Are you following any particular guide in terms of setting up the connection? If yes, please provide the links.
Have you contacted Prisma support regarding the DNS error?
Yes, MongoDB can connect with the office network, and all is good. The problem just in my sharing network with my smartphone that used Telkomsel provider and some of the developers in my group are experiencing something similar and until now still have not found a solution.
I haven’t made contact with Prisma’s help center because I think the issue is in the MongoDB settings or a problem with my provider regarding srv. Some time ago I tried to install MongoDB compass to connect, and it worked. But I found another error that I can’t push data to MongoDB local, but I forgot what that error was, but it’s a different error.
From this information I would assume there are no issues with the Atlas project’s network access list or cluster.
My interpretation is that you cannot connect when using a tethered network connection with your smartphone? Is this correct? Sounds like it probably is a network issue with the hotspot connection based on this. Have you tried performing some basic network tests whilst using the mobile hotspot connection? You can also try running the following on the problematic network to see what the response is: