I/o timeout error while executing mongorestore data import

mongorestore --drop --gzip --uri mongodb+srv://m220student:m220bapu@clusterm220-au2bo.mongodb.net/test data 2019-02-14T17:42:43.678+0530 error parsing command line options: error parsing uri (mongodb+srv://m220student:m220bapu@clusterm220-au2bo.mongodb.net/test): lookup _mongodb._tcp.clusterm220-au2bo.mongodb.net on 192.168.0.1:53: read udp 192.168.0.102:55486->192.168.0.1:53: i/o timeout 2019-02-14T17:42:43.678+0530 try 'mongorestore --help' for more information mongorestore --drop --gzip --uri mongodb+srv://m220student:m220bapu@clusterm220-au2bo.mongodb.net/test data
2019-02-14T21:27:01.784+0530 error parsing command line options: error parsing uri (mongodb+srv://m220student:m220bapu@clusterm220-au2bo.mongodb.net/test): lookup _mongodb._tcp.clusterm220-au2bo.mongodb.net on 192.168.0.1:53: read udp 192.168.0.102:59700->192.168.0.1:53: i/o timeout
2019-02-14T21:27:01.784+0530 try ‘mongorestore --help’ for more information

The instruction specifies to use m220password as the password. Any reason why you use m220bapu?

I do not think that this is the reason why you get the i/o timeout error. However many times, people have problems because they do not follow the instructions exactly. Because the validation scripts verify if the right things are at the right places. For example, if the instructions ask to create a collection named ‘m220-collection’ and you create one named ‘collection-m220’, the validation script will complain that you did not created the collection.

1 Like

I changed the password to m220password, still I am getting the same error:

ls README.rst mflix run.py data migrations tests dotini_unix notebooks dotini_win requirements.txt mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@mflix-au2bo.mongodb.net/test data
2019-02-14T22:19:16.335+0530 error parsing command line options: error parsing uri (mongodb+srv://m220student:m220password@mflix-au2bo.mongodb.net/test): lookup _mongodb._tcp.mflix-au2bo.mongodb.net on 192.168.0.1:53: read udp 192.168.0.102:55770->192.168.0.1:53: i/o timeout
2019-02-14T22:19:16.336+0530 try ‘mongorestore --help’ for more information

This URI does not represent the same cluster as before.

You had:

Now you have

Did you recreated your cluster? If you change more that one variable it is hard to find out what is wrong because it might fails for different reasons. This being said, well written, mflix-au2bo.mongodb.net seems to be configured correctly as I was able to connect.

Can you connect with mongo shell?

If not then you may have a firewall blocking some traffic.

1 Like

Yes I re-created the cluster and I can connect the cluster from mongo shell. How to unblock the firewall traffic in macOS

I am a linux guy, sorry, I have no clue.

Well, MacOS is just another Unix @steevej-1495 :wink:

Yes I re-created the cluster and I can connect the cluster from mongo shell. How to unblock the firewall traffic in macOS

By default, MacOS does not have an outgoing firewall. The firewall in MacOS only blocks incoming traffic. So this is not a firewall issue, unless you installed something like Little Snitch. Unless you know what you’re doing, please do not disable security features of your operating system!

Especially because you said:

and I can connect the cluster from mongo shell.

That means your system can indeed talk to the cluster.

Now… A timeout could be caused by the amount of data you’re uploading, combined with the speed of your network connection. I’ve forgotten: how large is the M220P dataset? Kilobytes? Megabytes? Tens or hundreds of megabytes? And how fast is your Internet upload-speed? If your system can’t continuously push the data into the cluster it may result in timeouts.