[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 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


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.


Fix for Ubuntu 18.04

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