DNSProtocolError: Invalid SRV answer

Greetings,

I try to pass this command: mongo “mongodb+srv://webdevbootcamp-vljsf.mongodb.net/test” --username m001-student

Got this error: DNSProtocolError: Invalid SRV answer for “webdevbootcamp-vljsf.mongodb.net

Can someone help please?
I am running MongoDB shell v4.2.3

Thank you.

Use normal double quotes or single quotes.

Hi,

I’ve tried single quotes. Still having the same issue.

Thanks

I can connect to your cluster with the given command as it is
I am using v4.0.5

Did you try standard URI format?

mongo “mongodb://webdevbootcamp-shard-00-00-vljsf.mongodb.net:27017,webdevbootcamp-shard-00-01-vljsf.mongodb.net:27017,webdevbootcamp-shard-00-02-vljsf.mongodb.net:27017/test?replicaSet=webdevbootcamp-shard-0” --ssl --authenticationDatabase admin --username m001-student --password m001-mongodb-basics

Above one works too for me

Hi @Ramachandra_37567,

Can you please confirm that you are still able to connect to the cluster using both the connection string ?

As I am not able to connect to this cluster using either of the strings.

Thanks,
Shubham Ranjan
Curriculum Services Engineer

Hi @James_43844,

If you are still not able to connect then please create another project in your Organization and spin up a new M0 cluster while I’m investigating the current issue.

Thanks,
Shubham Ranjan
Curriculum Services Engineer

Hi,

Thank you all for responding to my query. I’ve found the issue and have resolve it.

It all happens because of my DNS server refusing the connection. I’ve change the DNS IP and it worked.

To Shubham, I think you couldn’t connect to it because I’ve delete that webdevbootcamp cluster and create under the name sandbox.

Thank you all once again.

Regards,

James