[resolved] Mongorestore cannot unmarshal DNS message

While i am able to connect to the cluster via the mongoshell
the mongorestore command

mongorestore --drop --gzip --uri \
  "mongodb+srv://m220student:m220password@/mflix-aul5z.mongodb.net" data

is failing with the following output:
error parsing command line options: error parsing uri (mongodb+srv://m220student:m220password@mflix-aul5z.mongodb.net): lookup mflix-aul5z.mongodb.net on 172.20.10.1:53: cannot unmarshal DNS message

Please check this link

Cannot unmarshal DNS message - Error while importing data to mongo from mflix-js

Hi @Gregor_27560,

Please try after removing / after password.

 mongorestore --drop --gzip --uri "mongodb+srv://m220student:m220password@mflix-aul5z.mongodb.net" data

Kanika

Thanks, but this is just a typo in my post. Sorry for that.
However, after trying again some time later with another IPS the mongorestore worked as expected.

Glad to hear! :slight_smile:

Let me know if you face any issues.

Kanika

Fix for Ubuntu 18.04

Locate /etc/resolv.conf file and replace the nameserver with 8.8.8.8 , and everything should work just fine. If that does not work , try 1.1.1.1 .