Subject: [mongodb-user] Re: how can I import a *.json
importing remotely?



Hi Beth

The error message means that mongoimport cannot connect to the MongoDB deployment. This is because the --host parameter of mongoimport does not recognize MongoDB URI format (there is --uri parameter for that purpose instead). The --host parameter requires mongodb host to connect to (e.g. replicasetname/host1,host2 for replica sets).

You would need to modify your parameters to be:

mongoimport --host "ProductionCluster-shard-0/productioncluster-shard-00-00-tcdnn.mongodb.net:27017,productioncluster-shard-00-01-tcdnn.mongodb.net:27017,productioncluster-shard-00-02-tcdnn.mongodb.net:27017" --authenticationDatabase admin --ssl --username=XXXXX --password=XXXXXXX --db=allYears --collection=uKPostal --drop --file=unit.json

Best regards,
Kevin

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mongodb-user.
r /> To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/393619bd-09a3-4331-a912-7b0d2dfb7a38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Programming list archiving by: Enterprise Git Hosting