Meteor.com and mongoimport


#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
  1. 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?


#2

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.


#3

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


#4

It was 2 command in shell… I think less then 1 minite


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

#6

Damn

$ mongoimport --version
mongoimport version 2.4.9

Can it be a problem?


#7

no, I use these versions and import successfully

can’t think of other suggestions at the moment