• Home
  • Jobs
  • coursesAndChallenges
  • Teachers
  • For business
  • Blog
  • ES/EN

0

127
Views
Error: querySrv ENOTFOUND _mongodb._tcp.cluster0.kspub.mongodb.net

my web app cannot connect to mongo dB atlas and it shows me the following error

Failed to connect to the database :Error: querySrv ENOTFOUND _mongodb._tcp.cluster0.kspub.mongodb.net
2022-01-18T16:58:59.817138+00:00 app[web.1]: (node:34) UnhandledPromiseRejectionWarning: Error: querySrv ENOTFOUND _mongodb._tcp.cluster0.kspub.mongodb.net
2022-01-18T16:58:59.817138+00:00 app[web.1]: at QueryReqWrap.onresolve [as oncomplete] (dns.js:210:19)
2022-01-18T16:58:59.817139+00:00 app[web.1]: (Use `node --trace-warnings ...` to show where the warning was created)

error message

even though it works locally and connects to the database, here is my code https://github.com/yara121/mern-app/blob/main/server/src/app.js

11 days ago ·

Santiago Trujillo

1 answers
Answer question

0

Visit you mongodb atlas dashboard >> Go to your network access >> Edit your current whitelisted IP address >> click "Allow access from anywhere"

This did the trick for me, thanks

11 days ago · Santiago Trujillo Report
Answer question
Remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Startups
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.