Mongoimport: Failed: error connecting to db server: no reachable servers

Running the daemon:
mongod --config ./mongod.conf
Connecting via mongo shell – works well
mongo admin --host localhost:27000 -u m103-application-user -p m103-application-pass
But mongoimport fails!
mongoimport --host=127.0.0.1 --port=2700 --db=applicationData -u=m103-application-user -p=m103-application-pass -c=products ./data/products.json
2019-11-18T18:51:51.292+0000 […] applicationData.products 0B/87.9MB (0.0%)
2019-11-18T18:51:51.805+0000 […] applicationData.products 0B/87.9MB (0.0%)
2019-11-18T18:51:51.808+0000 Failed: error connecting to db server: no reachable servers
2019-11-18T18:51:51.808+0000 imported 0 documents
Please advise.

I’ve highlighted the problem.

1 Like

Hi @evgeni,

I’m glad your issue got resolved. If you have any other query then please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer