简体   繁体   中英

Connection to MongoDB Atlas timesout

I'm trying to deploy my project and the first step was to deployt the mongodatabase that locally works like a charm.

Created a project and a cluster, set to accept connectios from anywhere and created my admin user, but when I try to connect with Node, CLI or Compass it gives me this error:

DNSHostNotFound: Failed to look up service "_mongodb._tcp.yelpcamp-owbnc.gcp.mongodb.net": Connection timed out try 'mongo --help' for more information

I'm using Manjaro GNOME.

The problem was a DNS error on Linux, I don't know what exactly caused this: but here's a solution:

Go to the /etc/resolv.conf and add other nameservers. Most commons are 8.8.8.8 and 8.8.4.4 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM