none
April 7, 2015, 8:35am
1
Hi everyone.
Why I can connect “meteor mongo myurl.metor.com ”, but mongoimport - can’t?
I tried:
1)
mongoimport --username none --password superpuperpassword --host production-db-a2.meteor.io --port 27017 --db myurl_meteor_com --collection mycollection --jsonArray --drop --headerline --file ./data.js
Then
meteor mongo -U myurl.meteor.com
result:
mongodb://client-blabla:4a318b48-64d2-a5f6-70f4-blabla@production-db-a2.meteor.io:27017/myurl_meteor_com
Then I tried:
mongoimport --username client-blabla --password 4a318b48-64d2-a5f6-70f4-blabla --host production-db-a2.meteor.io --port 27017 --db myurl_meteor_com --collection mycollection --jsonArray --drop --headerline --file ./data.js
And always the same result:
connected to: production-db-a2.meteor.io:27017
assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }
what I’m doing wrong?
I would be interested to know if it wasn’t authentication failing and something else. Make sure you do it quickly because those keys last only a minute i think.
what version is your meteor’s mongo?
what version is your mongo outside meteor?
auth version incompatibility (e.g. mongoDB 3.0 uses auth 5, while 2.6 uses 3) would result in auth failing
none
April 7, 2015, 12:57pm
4
It was 2 command in shell… I think less then 1 minite
none
April 7, 2015, 1:00pm
5
Local:
$ meteor mongo
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:3001/meteor
meteor:PRIMARY> exit
bye
Remote:
$ meteor mongo myurl.meteor.com
MongoDB shell version: 2.6.7
connecting to: production-db-a2.meteor.io:27017/myurl_meteor_com
production-a:PRIMARY>
none
April 7, 2015, 1:01pm
6
Damn
$ mongoimport --version
mongoimport version 2.4.9
Can it be a problem?
no, I use these versions and import successfully
can’t think of other suggestions at the moment