Hi,
We have configured a MongoDB primary (4.0.6) and MongoDB secondary (4.0.12) [without voting-static primary].
It looks like the replication is running without errors.
The problem is: when I make data updates (on primary) the updates do not replicate to the secondary.
Please help me to fix the problem and load delta changes to secondary.
The replication status shows:
{
"set" : "rs0",
"date" : ISODate("2020-05-27T22:27:30.923Z"),
"myState" : 1,
"term" : NumberLong(1),
"syncingTo" : "",
"syncSourceHost" : "",
"syncSourceId" : -1,
"heartbeatIntervalMillis" : NumberLong(2000),
"optimes" : {
"lastCommittedOpTime" : {
"ts" : Timestamp(1590618446, 1),
"t" : NumberLong(1)
},
"readConcernMajorityOpTime" : {
"ts" : Timestamp(1590618446, 1),
"t" : NumberLong(1)
},
"appliedOpTime" : {
"ts" : Timestamp(1590618446, 1),
"t" : NumberLong(1)
},
"durableOpTime" : {
"ts" : Timestamp(1590618446, 1),
"t" : NumberLong(1)
}
},
"lastStableCheckpointTimestamp" : Timestamp(1590618426, 1),
"members" : [
{
"_id" : 0,
"name" : "mongomaster:27017",
"health" : 1.0,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 2171988,
"optime" : {
"ts" : Timestamp(1590618446, 1),
"t" : NumberLong(1)
},
"optimeDate" : ISODate("2020-05-27T22:27:26.000Z"),
"syncingTo" : "",
"syncSourceHost" : "",
"syncSourceId" : -1,
"infoMessage" : "",
"electionTime" : Timestamp(1588464660, 2),
"electionDate" : ISODate("2020-05-03T00:11:00.000Z"),
"configVersion" : 5,
"self" : true,
"lastHeartbeatMessage" : ""
},
{
"_id" : 1,
"name" : "mongoslave:27018",
"health" : 1.0,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 501546,
"optime" : {
"ts" : Timestamp(1590116889, 1),
"t" : NumberLong(1)
},
"optimeDurable" : {
"ts" : Timestamp(1590116889, 1),
"t" : NumberLong(1)
},
"optimeDate" : ISODate("2020-05-22T03:08:09.000Z"),
"optimeDurableDate" : ISODate("2020-05-22T03:08:09.000Z"),
"lastHeartbeat" : ISODate("2020-05-27T22:27:29.378Z"),
"lastHeartbeatRecv" : ISODate("2020-05-22T03:08:11.889Z"),
"pingMs" : NumberLong(2),
"lastHeartbeatMessage" : "",
"syncingTo" : "",
"syncSourceHost" : "",
"syncSourceId" : -1,
"infoMessage" : "",
"configVersion" : 5
}
],
"ok" : 1.0,
"operationTime" : Timestamp(1590618446, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1590618446, 1),
"signature" : {
"hash" : { "$binary" : "P7jNLR6UPsFLFA3EHFCpl23MJDM=", "$type" : "00" },
"keyId" : NumberLong(6822403774141693953)
}
}
}