I have a twice-daily backup script that connects to our managed mongo instance with mongodump and then rsyncs the data off-site.
The command is essentially:
mongodump --uri="mongodb+srv://$USERNAME:$PASSWORD@store-2e6b091b.mongo.ondigitalocean.com/$DB?authSource=admin&replicaSet=store&ssl=true" --gzip --archive="$FILENAME" --sslCAFile=$CA
After running fine for months, a few days ago it’s failing to connect to mongo with the error:
error parsing command line options: error parsing uri: lookup store-2e6b091b.mongo.ondigitalocean.com on 127.0.0.53:53: cannot unmarshal DNS message
Searching for the error message seems to imply that the DNS resolver doesn’t support the
mongodb+srv:// lookup, but I’m not sure why it would suddenly stop working now after working fine for months.
Any help would be appreciated!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.