mongo 单机多实例配置复制集,初始化报错

发布问题 回首页

mongo 单机多实例配置复制集,初始化报错

★ 1 1 person favorited this question

printjson(rsconf)
{
“_id” : “rs2″,
“members” : [
{
"_id" : 0,
"host" : "10.66.102.92:27017"
},
{
"_id" : 1,
"host" : "10.66.102.92:27018"
},
{
"_id" : 2,
"host" : "10.66.102.92:27019"
}
]
}

rs.initiate(rsconf);
{
“operationTime” : Timestamp(0, 0),
“ok” : 0,
“errmsg” : “replSetInitiate quorum check failed because not all proposed set members responded affirmatively: 10.66.102.92:27018 failed with Error connecting to 10.66.102.92:27018 :: caused by :: Connection refused, 10.66.102.92:27019 failed with Error connecting to 10.66.102.92:27019 :: caused by :: Connection refused”,
“code” : 74,
“codeName” : “NodeNotFound”,
“$clusterTime” : {
“clusterTime” : Timestamp(0, 0),
“signature” : {
“hash” : BinData(0,”AAAAAAAAAAAAAAAAAAAAAAAAAAA=”),
“keyId” : NumberLong(0)
}
}
}

wys 在大约 之前 回答了
  • 提问于
  • Answers2 个
  • 浏览 5 次
  • 最新活跃于

2 个回答2

0
wys answered about

已解决,原因是因为bindIp是127.0.0.1,导致主机连不过去,修改bindIp为0.0.0.0即可

0
wys answered about

求各位大佬赐教!

To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create