在主节点上添加新的 MongoDB 副本集节点后,我得到
> rs.status()
{
...
{
"_id" : 2,
"name" : "nde3.test.com:27017",
"health" : 1,
"state" : 6,
"stateStr" : "UNKNOWN",
"uptime" : 129,
"optime" : {
"t" : 0,
"i" : 0
},
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" : ISODate("2013-06-06T13:01:30Z"),
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
"pingMs" : 64,
"lastHeartbeatMessage" : "still initializing"
}
],
...
}
在新节点上我得到
> rs.status()
{
"startupStatus" : 4,
"ok" : 0,
"errmsg" : "can't currently get local.system.replset config from self or any seed (EMPTYUNREACHABLE)"
}
答案1
我的“/etc/hosts/”中有一个拼写错误新的副本集节点
例子
nde3.test.com 1.1.1.1
本来应该
nde3.test.com 1.1.1.2