I faced some problems. Will appraciate if someone can help me to figure it out.
Mongo Version : 4.4.6
Machine : LInux
Step1 : runing Mongo Repl
mongod --replSet mdbDefGuide --dbpath /data/rs2 --port 27018 --oplogSize 200
mongod --replSet mdbDefGuide --dbpath /data/rs1 --port 27017 --oplogSize 200
mongod --replSet mdbDefGuide --dbpath /data/rs3 --port 27019 --oplogSize 200
Step2 : config and initiate
var rsconf = {
_id:"mdbDefGuie",
members:[
_id:0,host:"localhost:27017",
]
}
rs.initiate(rsconf)
Step3 : mongo --nodb --norc
name:"one-min-shards",
chunkSize:1,
shards:2,
rs:{
nodes:3,
oplopSize:10
},
other:{enableBalancer:true}
})
Step 4 : Mongo in shard-mode property.
Step 5 : shutdown all mongo daemon
Step 6 : restart mongo like step1
Step 7 : same with Step 3
Step 8 : get problems
c20006| {"t":{"$date":"2022-02-23T16:55:13.922+08:00"},"s":"I", "c":"SHARDING", "id":22727, "ctx":"shard-registry-reload","msg":"Error running periodic reload of shard registry","attr":{"error":"NotYetInitialized: could not get updated shard list from config server :: caused by :: Cannot use non-local read concern until replica set is finished initializing.","shardRegistryReloadIntervalSeconds":30}}
c20008| {"t":{"$date":"2022-02-23T16:55:43.879+08:00"},"s":"I", "c":"SHARDING", "id":22727, "ctx":"shard-registry-reload","msg":"Error running periodic reload of shard registry","attr":{"error":"NotYetInitialized: could not get updated shard list from config server :: caused by :: Cannot use non-local read concern until replica set is finished initializing.","shardRegistryReloadIntervalSeconds":30}}
c20007| {"t":{"$date":"2022-02-23T16:55:43.893+08:00"},"s":"I", "c":"SHARDING", "id":22727, "ctx":"shard-registry-reload","msg":"Error running periodic reload of shard registry","attr":{"error":"NotYetInitialized: could not get updated shard list from config server :: caused by :: Cannot use non-local read concern until replica set is finished initializing.","shardRegistryReloadIntervalSeconds":30}}
c20006| {"t":{"$date":"2022-02-23T16:55:43.922+08:00"},"s":"I", "c":"SHARDING", "id":22727, "ctx":"shard-registry-reload","msg":"Error running periodic reload of shard registry","attr":{"error":"NotYetInitialized: could not get updated shard list from config server :: caused by :: Cannot use non-local read concern until replica set is finished initializing.","shardRegistryReloadIntervalSeconds":30}}
c20006| {"t":{"$date":"2022-02-23T16:55:43.951+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1645606543:951635][8761:0x7f5530abe700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 63, snapshot max: 63 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0)"}}
c20007| {"t":{"$date":"2022-02-23T16:55:43.951+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1645606543:951072][8765:0x7fe0ac156700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 63, snapshot max: 63 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0)"}}
c20008| {"t":{"$date":"2022-02-23T16:55:43.953+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1645606543:953429][8767:0x7f9cebf0f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 63, snapshot max: 63 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0)"}}
c20008| {"t":{"$date":"2022-02-23T16:56:13.879+08:00"},"s":"I", "c":"SHARDING", "id":22727, "ctx":"shard-registry-reload","msg":"Error running periodic reload of shard registry","attr":{"error":"NotYetInitialized: could not get updated shard list from config server :: caused by :: Cannot use non-local read concern until replica set is finished initializing.","shardRegistryReloadIntervalSeconds":30}}
c20007| {"t":{"$date":"2022-02-23T16:56:13.893+08:00"},"s":"I", "c":"SHARDING", "id":22727, "ctx":"shard-registry-reload","msg":"Error running periodic reload of shard registry","attr":{"error":"NotYetInitialized: could not get updated shard list from config server :: caused by :: Cannot use non-local read concern until replica set is finished initializing.","shardRegistryReloadIntervalSeconds":30}}
c20006| {"t":{"$date":"2022-02-23T16:56:13.922+08:00"},"s":"I", "c":"SHARDING", "id":22727, "ctx":"shard-registry-reload","msg":"Error running periodic reload of shard registry","attr":{"error":"NotYetInitialized: could not get updated shard list from config server :: caused by :: Cannot use non-local read concern until replica set is finished initializing.","shardRegistryReloadIntervalSeconds":30}}
Reference:
rs.status()
{
"set" : "mdbDefGuide",
"date" : ISODate("2022-02-23T09:21:26.656Z"),
"myState" : 2,
"term" : NumberLong(11),
"syncSourceHost" : "localhost:27017",
"syncSourceId" : 0,
"heartbeatIntervalMillis" : NumberLong(2000),
"majorityVoteCount" : 2,
"writeMajorityCount" : 2,
"votingMembersCount" : 3,
"writableVotingMembersCount" : 3,
"optimes" : {
"lastCommittedOpTime" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"lastCommittedWallTime" : ISODate("2022-02-23T09:21:18.926Z"),
"readConcernMajorityOpTime" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"readConcernMajorityWallTime" : ISODate("2022-02-23T09:21:18.926Z"),
"appliedOpTime" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"durableOpTime" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"lastAppliedWallTime" : ISODate("2022-02-23T09:21:18.926Z"),
"lastDurableWallTime" : ISODate("2022-02-23T09:21:18.926Z")
},
"lastStableRecoveryTimestamp" : Timestamp(1645608078, 1),
"electionParticipantMetrics" : {
"votedForCandidate" : true,
"electionTerm" : NumberLong(11),
"lastVoteDate" : ISODate("2022-02-23T09:15:58.862Z"),
"electionCandidateMemberId" : 0,
"voteReason" : "",
"lastAppliedOpTimeAtElection" : {
"ts" : Timestamp(1645607756, 1),
"t" : NumberLong(10)
},
"maxAppliedOpTimeInSet" : {
"ts" : Timestamp(1645607756, 1),
"t" : NumberLong(10)
},
"priorityAtElection" : 1,
"newTermStartDate" : ISODate("2022-02-23T09:15:58.884Z"),
"newTermAppliedDate" : ISODate("2022-02-23T09:16:00.881Z")
},
"members" : [
{
"_id" : 0,
"name" : "localhost:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 5769,
"optime" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"optimeDurable" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"optimeDate" : ISODate("2022-02-23T09:21:18Z"),
"optimeDurableDate" : ISODate("2022-02-23T09:21:18Z"),
"lastHeartbeat" : ISODate("2022-02-23T09:21:25.040Z"),
"lastHeartbeatRecv" : ISODate("2022-02-23T09:21:25.063Z"),
"pingMs" : NumberLong(0),
"lastHeartbeatMessage" : "",
"syncSourceHost" : "",
"syncSourceId" : -1,
"infoMessage" : "",
"electionTime" : Timestamp(1645607758, 1),
"electionDate" : ISODate("2022-02-23T09:15:58Z"),
"configVersion" : 5,
"configTerm" : 11
},
{
"_id" : 1,
"name" : "localhost:27018",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 281,
"optime" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"optimeDurable" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"optimeDate" : ISODate("2022-02-23T09:21:18Z"),
"optimeDurableDate" : ISODate("2022-02-23T09:21:18Z"),
"lastHeartbeat" : ISODate("2022-02-23T09:21:25.040Z"),
"lastHeartbeatRecv" : ISODate("2022-02-23T09:21:25.602Z"),
"pingMs" : NumberLong(0),
"lastHeartbeatMessage" : "",
"syncSourceHost" : "localhost:27019",
"syncSourceId" : 2,
"infoMessage" : "",
"configVersion" : 5,
"configTerm" : 11
},
{
"_id" : 2,
"name" : "localhost:27019",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 5770,
"optime" : {
"ts" : Timestamp(1645608078, 1),
"t" : NumberLong(11)
},
"optimeDate" : ISODate("2022-02-23T09:21:18Z"),
"syncSourceHost" : "localhost:27017",
"syncSourceId" : 0,
"infoMessage" : "",
"configVersion" : 5,
"configTerm" : 11,
"self" : true,
"lastHeartbeatMessage" : ""
}
],
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1645608078, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1645608078, 1)
}