0

I am attempting to connection to a database I set up on MongoDB Atlas but continue to get the error message below that prevents me from connecting. I am unsure how to resolve it. I also don't know what the error message means.

{ Error: querySrv ENODATA _mongodb._tcp.cluster1-rjwoe.mongodb.net at QueryReqWrap.onresolve [as oncomplete] (dns.js:197:19) errno: 'ENODATA', code: 'ENODATA', syscall: 'querySrv', hostname: '_mongodb._tcp.cluster1-rjwoe.mongodb.net' }

I have restarted the project but still get the same error information. I have also switched from one approach using mongoose.connect to mongoClient (essentially using the connection string only and the full driver example provided on MongoDB's site) At each attempt, I get the same error message.

I am intending to at this point just connect to the database. Any insight, help, solutions would be greatly appreciated. Thank you.

hiro
  • 1
  • 1
  • Have you switched networks, wifi or otherwise, since first setting up MongoDB Atlas? – Randy Casburn Jun 08 '19 at 23:04
  • Possible duplicate of [Accessing a MongoDB Atlas Cluster from within Google Cloud Functions Console](https://stackoverflow.com/questions/48859035/accessing-a-mongodb-atlas-cluster-from-within-google-cloud-functions-console) – Randy Casburn Jun 08 '19 at 23:09
  • Or any of these: https://www.google.com/search?q=Error:+querySrv+ENODATA+site:stackoverflow.com&client=safari&rls=en&sa=X&ved=2ahUKEwiiv8-M_9riAhVJY6wKHcA8Ch8QrQIoBDAAegQIBhAM&biw=2560&bih=1251 – Randy Casburn Jun 08 '19 at 23:09

0 Answers0