Error: Querysrv Enodata _mongodb._tcp.blog-cluster-0hb5z.mongodb.net At Queryreqwrap.onresolve [as Oncomplete]
Solution 1:
For some reason the dns server did not return srv records, changing the dns server to one that returns those records fixed the problem. (I used https://use.opendns.com/ to fix the it)
Solution 2:
I had the same problem working in a Starbucks went home and it connected right away try a different wifi connection.
Solution 3:
For me, this issue was only happening in a Starbucks coffee, and was something random, OpenDNS didn't work for me nor Google DNS or any other tried, funny because works just fine at home. Previously I was using mongodb+srv string format to connect inside "uri" using Mongoid and Ruby with a mongoid.yml configuration file.
In order to fix this issue, make sure to follow the configuration described in this link https://docs.atlas.mongodb.com/driver-connection/ (Mongoid Example)
production:# Configure available database clients. (required)clients:# Defines the default client. (required)default:# Defines the name of the default database that Mongoid can connect to.# (required).database:'myDatabaseName'# Provides the hosts the default client can connect to. Must be an array# of host:port pairs. (required)hosts:-mycluster0-shard-00-00.mongodb.net:27017-mycluster0-shard-00-01.mongodb.net:27017-mycluster0-shard-00-02.mongodb.net:27017options:# The name of the user for authentication.user:kay# The password of the user for authentication.password:myRealPassword# The database or source to authenticate the user against. If the database# specified above is not admin, admin MUST be specified here.auth_source:admin# All Atlas servers use SSL. (default: false)ssl:true
Solution 4:
I had this problem come up when I tried to access my MongoDB Atlas at a coffee shop. It had been working perfect previously, but suddenly was giving me this exact error. I am not sure why, I cannot give you all the details, but what fixed it for me was going to my cluster and connecting with the standard connection string. I copied and pasted that longer connection string and after putting in my password and setting it up, it worked for me. Hope that helped.
Solution 5:
In some cases, this happens when your IP address is not whitelisted in the MongoDB Atlas cluster. This is why it works with your IP address at home where you originally signed up your account, but doesn't work at a coffee shop WIFI or elsewhere.
So make sure your current IP address is added into your MongoDB cluster.
Post a Comment for "Error: Querysrv Enodata _mongodb._tcp.blog-cluster-0hb5z.mongodb.net At Queryreqwrap.onresolve [as Oncomplete]"