[DOCS-7950] Comment on: "primer/import-data.txt" Created: 24/May/16  Updated: 03/Nov/17  Resolved: 24/May/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Ravind Kumar (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64 bit, mongo DB 3.2.6

Location: https://docs.mongodb.com/getting-started/csharp/import-data/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; rv:11.0) like Gecko
Screen Resolution: 1867 x 1167


Participants:
Days since reply: 7 years, 38 weeks, 1 day ago

 Description   

Hello,

I tried 1) mongoimport --db test --collection restaurants --drop --file primer-dataset.json
2) mongoimport --host 127.0.0.1:27017 --db test --collection restaurants --drop --file primer-dataset.json
3) mongoimport --host localhost --db test --collection restaurants --drop --file primer-dataset.json
All gave the same error: Failed: error connecting to db server: no reachable servers
Would you please help?



 Comments   
Comment by Ravind Kumar (Inactive) [ 24/May/16 ]

User reports problem is currently resolved.

Comment by Ravind Kumar (Inactive) [ 24/May/16 ]

Hello,

Can you confirm that you have a mongod process running on your localhost, at the specified port?

You can use something like ps ax | grep mongod to see if the server is running.

If there is no server running, you first need to start the mongod, specifying a data directory for the mongod to keep the server files in. For example,

mongod --dbpath /usr/local/mongodb/data/

Would start the mongod, specifying /usr/local/mongodb/data/ as the target directory to keep its server files. Please note that the user running the mongod process must have access to this folder, and the folder should already exist, in order to avoid any potential issues or errors.

If there is a mongod process running on your localhost, please confirm it is listening on port 27017. You may need to stop the server and re-start it while confirming the startup settings.

Generated at Thu Feb 08 07:55:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.