MongoDB:由于内部错误而导致空投失败

时间:2019-10-11 14:21:47

标签: mongodb replication

我正在尝试在MongoDB 4.2中解决复制问题,但是我无法再将主服务器恢复为主服务器,它始终保持在SECONDARY模式。我已经尝试了几种类型的解决方案,例如thishere

但没有成功。

在日志中,我遇到了以下消息:

 Scheduling remote command request for vote request: RemoteCommand 729 -- target:mongo2:27021 db:admin cmd:{ replSetRequestVotes: 1, setName: "MyReplicaSet", dryRun: true, term: 2, candidateIndex: 0, configVersion: 125668, lastCommittedOp: { ts: Timestamp(1570799675, 1), t: 2 } }
 2019-10-11T11:17:25.041-0300 I  ELECTION [replexec-2] VoteRequester(term 2 dry run) received an invalid response from mongo2:27021: NotYetInitialized: no replset config has been received; response message: { operationTime: Timestamp(0, 0), ok: 0.0, errmsg: "no replset config has been received", code: 94, codeName: "NotYetInitialized", $clusterTime: { clusterTime: Timestamp(1570799675, 1), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } } }
 2019-10-11T11:17:25.041-0300 I  ELECTION [replexec-2] not running for primary, we received insufficient votes
 2019-10-11T11:17:25.041-0300 I  ELECTION [replexec-2] Lost dry run election due to internal error

该如何解决?

1 个答案:

答案 0 :(得分:0)

似乎此问题已在mongodb 4.2.10中修复:https://jira.mongodb.org/browse/SERVER-47263