Error import data into atlas cluster

pk@pk:~/Downloads/m220/mflix-python$ mongorestore --drop --gzip --uri “mongodb+srv://m220student:m220password@mflix-eiv9p.mongodb.net/test” data

2018-10-18T14:24:20.057+0800 error parsing command line options: error parsing uri (mongodb+srv://m220student:m220password@mflix-eiv9p.mongodb.net/test): lookup _mongodb._tcp.mflix-eiv9p.mongodb.net on 127.0.0.53:53: no such host
2018-10-18T14:24:20.057+0800 try ‘mongorestore --help’ for more information

follow the steps in the course get into the virtual env and then try the command with the quotes it should work.

still the same error:
I have viruatial envirnoment activated
pip install requirement gave no issue

Here is the scree output:

(mflix_venv) pk@pk:~/Downloads/m220/mflix-python$ mongorestore --drop --gzip --uri “mongodb+srv://m220student:m220password@mflix-eiv9p.mongodb.net/test” data
2018-10-18T14:35:21.340+0800 error parsing command line options: error parsing uri (mongodb+srv://m220student:m220password@mflix-eiv9p.mongodb.net/test): lookup _mongodb._tcp.mflix-eiv9p.mongodb.net on 127.0.0.53:53: no such host
2018-10-18T14:35:21.340+0800 try ‘mongorestore --help’ for more information

can i try importing the data into your atlas, later you can delete it and try again if it works.

ok, please do so, thanks…

Hey but if that works you have to try it again that’s the only way you learn since you are on linux i cannot be of much help with that.

see its working you can log into you cluster and check the data it is still importing so give it some time. i don’t have access to delete the data so you will have to do it on your own, and i have reached my limit to post replies as its’s my first day. folllow the course from the start and see if you can get to import data i might as well learn something. see you tomo.:sunglasses:

yes i will delete, or you can delete as you can access it now

is it because of some non matching version issue
I used the same command but did not worked

if i again use the mongorestore command it will remove everything and reload?

I get warning also when connect with standard uri 3.4+

WARNING: shell and server versions do not match

Indeed now, show dbs;
show mflix

thanks

Spent almost three days trying to fix this.
But solution was very simple:
You have to remove mongoDB shell version 4+, as it contains mongorestore v 3.2.2, which does not support --uri argument. Than install mongoDB shell version 3.6.8. There is the mongorestore 3.6.8.
That’s all trick.
P.S. Have no idea why old version of mongorestore included into a new mongoDB shell.

Hi Roman I am using the MongoDB shell version 4.0.2 and it has the same version of mongorestore.

Hello Roman_26151,

Thanks for the note. Obtaining the correct URI string is very important for this course, and we will try to clarify instructions on how to do this in the future.

Matt

Probably, the issue exists only in Ubuntu 16.04 x64 package.
I installed MongoDB v4.0 on the system without any mongodb shell. Then reinstalled it two times with the same result.
As I know on Mac version there is no issue.
Also I see, you use Windows.

Thanks, I had difficulties with that

Hi,

I am also facing same issue while importing data into Atlas I tried multiple options but its not working for me

mongorestore --drop --gzip --uri ‘mongodb+srv://username:password@x@cluster0-zcogt.mongodb.net/test’ data

I have password which has ‘@’ . I am using windows machine.

#mongodb shell version
MongoDB shell version v4.0.3

#mongorestore --version
mongorestore version: r4.0.3

I have created project with new cluster with user name as m220student and password as m220password which worked.

I think issue is if we use @1 in password or username its not working.

Can someone help? i’m not able to import the data. Getting below error.

C:\Users\LEN X220-2\Downloads\mflix-python>C:“Program Files”\MongoDB\Server\3.6
\bin\mongorestore --drop --gzip --uri “mongodb+srv://m220student:m220password@mf
lix-yhnlx.mongodb.net/test?retryWrites=true” data
2019-01-11T16:18:23.248+0000 Failed: error connecting to db server: no reacha
ble servers

Please help…!

I sent the following command:
(mflix_venv) NJBBMACL1408:mflix-python$mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@mflix-9ytxn.mongodb.net/test data

and got the following error:
2019-01-11T15:19:15.512-0500 error dialing mflix-shard-00-00-9ytxn.mongodb.net:27017: SSL errors: SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

THis was happened after the following:
(mflix_venv) NJBBMACL1408:mflix-python$ mongo “mongodb+srv://mflix-9ytxn.mongodb.net/test” --username m220student

MongoDB shell version v4.0.5

Enter password:

connecting to: mongodb://mflix-shard-00-02-9ytxn.mongodb.net.:27017,mflix-shard-00-00-9ytxn.mongodb.net.:27017,mflix-shard-00-01-9ytxn.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=mflix-shard-0&ssl=true

2019-01-11T14:13:26.326-0500 I NETWORK [js] Starting new replica set monitor for mflix-shard-0/mflix-shard-00-02-9ytxn.mongodb.net.:27017,mflix-shard-00-00-9ytxn.mongodb.net.:27017,mflix-shard-00-01-9ytxn.mongodb.net.:27017

2019-01-11T14:13:26.383-0500 I NETWORK [js] Successfully connected to mflix-shard-00-01-9ytxn.mongodb.net.:27017 (1 connections now open to mflix-shard-00-01-9ytxn.mongodb.net.:27017 with a 5 second timeout)

----and:
(mflix_venv) NJBBMACL1408:mflix-python$ mongo

MongoDB shell version v4.0.5

connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb

WARNING: No implicit session: Logical Sessions are only supported on server versions 3.6 and greater.

Implicit session: dummy session

MongoDB server version: 3.4.11

WARNING: shell and server versions do not match

Please remove “?retryWrites=true” and try again.

Thanks,
Shahul