mongorestore Failed: no reachable servers

后端 未结 12 1801
天涯浪人
天涯浪人 2020-12-15 03:06

I tried to restore mongo from dump but failed:

mongorestore --port 27133 dump
2015-05-07T09:39:11.760+0300    Failed: no reachable servers

12条回答
  •  一个人的身影
    2020-12-15 03:53

    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.

提交回复
热议问题