节点日志在恢复模式下,即使重启后也是如此:
2018-04-24T12:37:52.915 + 0530 I REPL [replication-0]我们也是 陈旧使用J-DB-02:27017作为同步源。将此同步列入黑名单 source是因为我们上次提取的时间戳:5ade01e0:66在他们之前 最早的时间戳:5aded094:198 1min直到: 2018-04-24T12:38:52.915 + 0530 2018-04-24T12:37:52.916 + 0530 I REPL [replication-0]无法找到要同步的成员 2018-04-24T12:37:52.916 + 0530 E REPL [rsBackgroundSync]过于陈旧无法赶上 - 进入维护模式 2018-04-24T12:37:52.916 + 0530 I REPL [rsBackgroundSync]我们最新的OpTime:{ts:时间戳1524498912000 | 102,t:68} 2018-04-24T12:37:52.916 + 0530 I REPL [rsBackgroundSync]最早可用的OpTime是{ts:时间戳1524551828000 | 408,t:68 } 2018-04-24T12:37:52.916 + 0530 I REPL [rsBackgroundSync]见http://dochub.mongodb.org/core/resyncingaverystalereplicasetmember 2018-04-24T12:37:52.916 + 0530 I REPL [rsBackgroundSync]进入维护模式,其他0维护模式任务正在进行中 2018-04-24T12:37:52.916 + 0530 I REPL [rsBackgroundSync]过渡到RECOVERING
以下是主服务器
的副本集状态WAPRS01:PRIMARY> db.oplog.rs.stats().maxSize
WAPRS01:PRIMARY> rs.status();
{
"set" : "WAPRS01",
"date" : ISODate("2018-04-24T07:17:15.276Z"),
"myState" : 1,
"term" : NumberLong(68),
"heartbeatIntervalMillis" : NumberLong(2000),
"optimes" : {
"lastCommittedOpTime" : {
"ts" : Timestamp(1524498912, 102),
"t" : NumberLong(68)
},
"appliedOpTime" : {
"ts" : Timestamp(1524554235, 160),
"t" : NumberLong(68)
},
"durableOpTime" : {
"ts" : Timestamp(1524554235, 92),
"t" : NumberLong(68)
}
},
"members" : [
{
"_id" : 0,
"name" : "J-DB-01:27017",
"health" : 1,
"state" : 3,
"stateStr" : "RECOVERING",
"uptime" : 569,
"optime" : {
"ts" : Timestamp(1524498912, 102),
"t" : NumberLong(68)
},
"optimeDurable" : {
"ts" : Timestamp(1524498912, 102),
"t" : NumberLong(68)
},
"optimeDate" : ISODate("2018-04-23T15:55:12Z"),
"optimeDurableDate" : ISODate("2018-04-23T15:55:12Z"),
"lastHeartbeat" : ISODate("2018-04-24T07:17:13.532Z"),
"lastHeartbeatRecv" : ISODate("2018-04-24T07:17:13.493Z"),
"pingMs" : NumberLong(0),
"configVersion" : 4
},
{
"_id" : 1,
"name" : "J-DB-02:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 299382,
"optime" : {
"ts" : Timestamp(1524554232, 270),
"t" : NumberLong(68)
},
"optimeDurable" : {
"ts" : Timestamp(1524554232, 270),
"t" : NumberLong(68)
},
"optimeDate" : ISODate("2018-04-24T07:17:12Z"),
"optimeDurableDate" : ISODate("2018-04-24T07:17:12Z"),
"lastHeartbeat" : ISODate("2018-04-24T07:17:13.454Z"),
"lastHeartbeatRecv" : ISODate("2018-04-24T07:17:13.864Z"),
"pingMs" : NumberLong(0),
"syncingTo" : "J-DB-03:27017",
"configVersion" : 4
},
{
"_id" : 2,
"name" : "J-DB-03:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 613420,
"optime" : {
"ts" : Timestamp(1524554235, 160),
"t" : NumberLong(68)
},
"optimeDate" : ISODate("2018-04-24T07:17:15Z"),
"electionTime" : Timestamp(1524254862, 1),
"electionDate" : ISODate("2018-04-20T20:07:42Z"),
"configVersion" : 4,
"self" : true
},
{
"_id" : 3,
"name" : "J-DB-04:27017",
"health" : 1,
"state" : 7,
"stateStr" : "ARBITER",
"uptime" : 300361,
"lastHeartbeat" : ISODate("2018-04-24T07:17:14.863Z"),
"lastHeartbeatRecv" : ISODate("2018-04-24T07:17:14.229Z"),
"pingMs" : NumberLong(0),
"configVersion" : 4
}
],
"ok" : 1
}
WAPRS01:PRIMARY>