Make sure you have added the replica set m103-repl-2 as

Hi

Does anyone encounter that problem ?

validate_lab_shard_collection

Mongos not configured correctly - make sure you have added the replica set m103-repl-2 as
your second shard.

Please check your config files for parameters
replSetName and clusterRole
What does rs.status() and sh.status() show?

rs.status()
{
“info” : “mongos”,
“ok” : 0,
“errmsg” : “replSetGetStatus is not supported through mongos”,
“operationTime” : Timestamp(1556704897, 1),
“$clusterTime” : {
“clusterTime” : Timestamp(1556704897, 1),
“signature” : {
“hash” : BinData(0,“RFsqseSrC9sqftVVcg2QjlI45yM=”),
“keyId” : NumberLong(“6684910515103203355”)
}
}
}

=========================

sh.status()
— Sharding Status —
sharding version: {
“_id” : 1,
“minCompatibleVersion” : 5,
“currentVersion” : 6,
“clusterId” : ObjectId(“5cc592b209b5756e5d2eb0c7”)
}
shards:
{ “_id” : “m103-repl-2”, “host” : “m103-repl-2/192.168.103.100:27004,192.168.103.100:27005,192.168.103.100:27006”, “state” : 1 }
active mongoses:
“3.6.12” : 1
autosplit:
Currently enabled: yes
balancer:
Currently enabled: yes
Currently running: no
Failed balancer rounds in last 5 attempts: 5
Last reported error: ReplicaSetMonitor for set m103-repl is removed
Time of Reported error: Mon Apr 29 2019 14:06:05 GMT+0000 (UTC)
Migration Results for the last 24 hours:
No recent migrations
databases:
{ “_id” : “config”, “primary” : “config”, “partitioned” : true }
config.system.sessions
shard key: { “_id” : 1 }
unique: false
balancing: true
chunks:
m103-repl 1
{ “_id” : { “$minKey” : 1 } } -->> { “_id” : { “$maxKey” : 1 } } on : m103-repl Timestamp(1, 0)
{ “_id” : “m103”, “primary” : “m103-repl-2”, “partitioned” : true }
m103.products
shard key: { “sku” : 1 }
unique: false
balancing: true
chunks:
m103-repl-2 3
{ “sku” : { “$minKey” : 1 } } -->> { “sku” : 23153496 } on : m103-repl-2 Timestamp(1, 0)
{ “sku” : 23153496 } -->> { “sku” : 28928914 } on : m103-repl-2 Timestamp(1, 1)
{ “sku” : 28928914 } -->> { “sku” : { “$maxKey” : 1 } } on : m103-repl-2 Timestamp(1, 2)

Hi @Tal_38236,

As the Lab suggests, your shard configuration should contain 2 shards:

 > use config
 > db.shards.find()
   { "_id" : "m103-repl", "host" : "m103-repl/192.168.103.100:27001,192.168.103.100:27003,m103.mongodb.university:27002", "state" : 1 }
   { "_id" : "m103-repl-2", "host" : "m103-repl-2/192.168.103.100:27004,192.168.103.100:27005,192.168.103.100:27006", "state" : 1 }

You had to add the shard to your already sharded cluster which you must have created in your previous labs.

Kanika