Importing products.json

Running the import as prescribed in Lab:
mongoimport --drop /dataset/products.json --port 26000 -u “m103-admin”
-p “m103-pass” --authenticationDatabase “admin”
–db m103 --collection products

  1. It’s taking a very long time - I would guess in the 2-hour range if I let it do the whole set (I stopped it as I wasn’t confident it was working.)

  2. this error pops up over and over every 30 secs or so:

error inserting documents: unable to initialize targeter for write op for collection test.products :: caused by :: FailedToSatisfyReadPreference: Database test not found due to Could not find host matching read preference { mode: “primaryPreferred” } for set m103-repl

I’m lost. Anyone else seeing these things? Any idea of what I may be doing wrong? Or maybe we are all seeing these and its fine?


Hi @Sheldon_O_Reilly_54245,

Please check all the nodes for m103-repl replica set are running before you try importing data.

Also, refer to the following post:

Please let me know, if you have any questions.