I tried to restore mongo from dump but failed:
mongorestore --port 27133 dump
2015-05-07T09:39:11.760+0300 Failed: no reachable servers
I have MongoDB installed through Homebrew, and was having this issue. Here are the symptoms:
These failed:
mongorestore dump
mongorestore dump --host=localhost
The error I got: Failed: error connecting to db server: no reachable servers
These worked (as a workaround):
mongorestore dump --host=127.0.0.1
mongorestore dump --host=0.0.0.0
This fixed the problem for me:
brew update && brew upgrade
That updated MongoDB to 3.0.7 and now mongorestore dump works without the host flag.