I have done a reconfigure on the primary host, so now it’s fine and working.
The PRIMARY seems to be initiated
- rs01:PRIMARY> rs.status()
{
“set” : “rs01”,
“date” : ISODate(“2021-09-16T09:54:05.971Z”),
“myState” : 1,
“term” : NumberLong(127),
“syncingTo” : “”,
“syncSourceHost” : “”,
“syncSourceId” : -1,
“heartbeatIntervalMillis” : NumberLong(2000),
“optimes” : {
“lastCommittedOpTime” : {
“ts” : Timestamp(1631786038, 1),
“t” : NumberLong(127)
},
“readConcernMajorityOpTime” : {
“ts” : Timestamp(1631786038, 1),
“t” : NumberLong(127)
},
“appliedOpTime” : {
“ts” : Timestamp(1631786038, 1),
“t” : NumberLong(127)
},
“durableOpTime” : {
“ts” : Timestamp(1631786038, 1),
“t” : NumberLong(127)
}
},
“lastStableCheckpointTimestamp” : Timestamp(1631786028, 1),
“electionCandidateMetrics” : {
“lastElectionReason” : “electionTimeout”,
“lastElectionDate” : ISODate(“2021-09-16T08:22:38.538Z”),
“electionTerm” : NumberLong(127),
“lastCommittedOpTimeAtElection” : {
“ts” : Timestamp(0, 0),
“t” : NumberLong(-1)
},
“lastSeenOpTimeAtElection” : {
“ts” : Timestamp(1631780542, 1),
“t” : NumberLong(126)
},
“numVotesNeeded” : 1,
“priorityAtElection” : 1,
“electionTimeoutMillis” : NumberLong(10000),
“newTermStartDate” : ISODate(“2021-09-16T08:22:38.628Z”),
“wMajorityWriteAvailabilityDate” : ISODate(“2021-09-16T08:22:38.769Z”)
},
“members” : [
{
“_id” : 0,
“name” : “rocketchat1:27017”,
“health” : 1,
“state” : 1,
“stateStr” : “PRIMARY”,
“uptime” : 5494,
“optime” : {
“ts” : Timestamp(1631786038, 1),
“t” : NumberLong(127)
},
“optimeDate” : ISODate(“2021-09-16T09:53:58Z”),
“syncingTo” : “”,
“syncSourceHost” : “”,
“syncSourceId” : -1,
“infoMessage” : “”,
“electionTime” : Timestamp(1631780558, 1),
“electionDate” : ISODate(“2021-09-16T08:22:38Z”),
“configVersion” : 2,
“self” : true,
“lastHeartbeatMessage” : “”
}
],
“ok” : 1,
“operationTime” : Timestamp(1631786038, 1),
“$clusterTime” : {
“clusterTime” : Timestamp(1631786038, 1),
“signature” : {
“hash” : BinData(0,“AAAAAAAAAAAAAAAAAAAAAAAAAAA=”),
“keyId” : NumberLong(0)
}
}
}
On the rocketchat2 now I want to inititate the secondary replicaset.
rs.initiate( {
… _id : “rs01”,
… members: [
… { _id: 0, host: “rocketchat1:27017” },
… { _id: 1, host: “rocketchat2:27017” }
… ]
… })
{
“ok” : 0,
“errmsg” : “Our config version of 1 is no larger than the version on rocketchat1:27017, which is 2”,
“code” : 103,
“codeName” : “NewReplicaSetConfigurationIncompatible”
}
<something ent wrong and I am not sure what gets wrong.