2

I am trying to solve a Replication issue here in MongoDB 4.2, but I can no longer get my Primary server back to primary, it always stays in SECONDARY mode. I've tried several types of solutions, like this Or here

But without success.

In the logs, I came across these messages:

 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

How to fix this?

Vitor Mazuco
  • 192
  • 2
  • 12

1 Answers1

0

It looks like this problem was fixed in mongodb 4.2.10: https://jira.mongodb.org/browse/SERVER-47263

pva
  • 1,937
  • 1
  • 11
  • 8