mongodb - 无法使用默认配置启动副本集 [英] mongodb - can't initiate replica set with default configuration

查看:64
本文介绍了mongodb - 无法使用默认配置启动副本集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照教程部署副本集.当我执行 rs.initiate() 时,我收到错误必须可以访问所有成员和种子才能启动集合",这很奇怪,因为唯一的成员是 localhost.

I am following this tutorial to deploy a replica set. When I execute rs.initiate() I get the error "all members and seeds must be reachable to initiate set" which is strange given that the only member is localhost.

推荐答案

我遇到了同样的错误.就我而言,这对我有帮助:

I had the same error. In my case the helped me:

cfg=rs.conf()
rs.reconfig(cfg,{force:true})

这篇关于mongodb - 无法使用默认配置启动副本集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆