MONGODEV:PRIMARY> rs.add( { host: “servername.domain.net:27019” } )
{
“operationTime” : Timestamp(1712851362, 1),
“ok” : 0,
“errmsg” : “Either all host names in a replica set configuration must be localhost references, or none must be; found 1 out of 2”,
“code” : 103,
“codeName” : “NewReplicaSetConfigurationIncompatible”,
“$clusterTime” : {
“clusterTime” : Timestamp(1712851362, 1),
“signature” : {
“hash” : BinData(0,“5Gu7J982ZNr74fkzARBqO3N0eXU=”),
“keyId” : NumberLong(“7356208045132611590”)
}
}
}
MONGODEV:PRIMARY> rs.status()
{
“set” : “MONGODEV”,
“date” : ISODate(“2024-04-11T16:02:56.528Z”),
“myState” : 1,
“term” : NumberLong(3),
“syncSourceHost” : “”,
“syncSourceId” : -1,
“heartbeatIntervalMillis” : NumberLong(2000),
“majorityVoteCount” : 1,
“writeMajorityCount” : 1,
“votingMembersCount” : 1,
“writableVotingMembersCount” : 1,
“optimes” : {
“lastCommittedOpTime” : {
“ts” : Timestamp(1712851372, 1),
“t” : NumberLong(3)
},
“lastCommittedWallTime” : ISODate(“2024-04-11T16:02:52.356Z”),
“readConcernMajorityOpTime” : {
“ts” : Timestamp(1712851372, 1),
“t” : NumberLong(3)
},
“readConcernMajorityWallTime” : ISODate(“2024-04-11T16:02:52.356Z”),
“appliedOpTime” : {
“ts” : Timestamp(1712851372, 1),
“t” : NumberLong(3)
},
“durableOpTime” : {
“ts” : Timestamp(1712851372, 1),
“t” : NumberLong(3)
},
“lastAppliedWallTime” : ISODate(“2024-04-11T16:02:52.356Z”),
“lastDurableWallTime” : ISODate(“2024-04-11T16:02:52.356Z”)
},
“lastStableRecoveryTimestamp” : Timestamp(1712851312, 1),
“electionCandidateMetrics” : {
“lastElectionReason” : “electionTimeout”,
“lastElectionDate” : ISODate(“2024-04-11T15:58:02.341Z”),
“electionTerm” : NumberLong(3),
“lastCommittedOpTimeAtElection” : {
“ts” : Timestamp(0, 0),
“t” : NumberLong(-1)
},
“lastSeenOpTimeAtElection” : {
“ts” : Timestamp(1712755066, 1),
“t” : NumberLong(2)
},
“numVotesNeeded” : 1,
“priorityAtElection” : 1,
“electionTimeoutMillis” : NumberLong(10000),
“newTermStartDate” : ISODate(“2024-04-11T15:58:02.348Z”),
“wMajorityWriteAvailabilityDate” : ISODate(“2024-04-11T15:58:02.449Z”)
},
“members” : [
{
“_id” : 0,
“name” : “127.0.0.1:27019”,
“health” : 1,
“state” : 1,
“stateStr” : “PRIMARY”,
“uptime” : 296,
“optime” : {
“ts” : Timestamp(1712851372, 1),
“t” : NumberLong(3)
},
“optimeDate” : ISODate(“2024-04-11T16:02:52Z”),
“lastAppliedWallTime” : ISODate(“2024-04-11T16:02:52.356Z”),
“lastDurableWallTime” : ISODate(“2024-04-11T16:02:52.356Z”),
“syncSourceHost” : “”,
“syncSourceId” : -1,
“infoMessage” : “”,
“electionTime” : Timestamp(1712851082, 1),
“electionDate” : ISODate(“2024-04-11T15:58:02Z”),
“configVersion” : 1,
“configTerm” : 3,
“self” : true,
“lastHeartbeatMessage” : “”
}
],
“ok” : 1,
“$clusterTime” : {
“clusterTime” : Timestamp(1712851372, 1),
“signature” : {
“hash” : BinData(0,“wGW5PZ7ZdxA063mUwWWQmrjBrKE=”),
“keyId” : NumberLong(“7356208045132611590”)
}
},
“operationTime” : Timestamp(1712851372, 1)
}
MONGODEV:PRIMARY>