Unable to add shard in mongos

While adding shard node to the mongos below error thrown


The lab asks

Add shard1 as the first shard in the cluster.

and specifies

shard1 is running on shard1/localhost:27001,localhost:27002,localhost:27003

but you do

sh.addShard( "m103-repl/" )

So it means, you specified

  1. the wrong replica set name m103-repl
  2. the wrong IP address
  3. and the wrong port number 27012

Actually my replicaset is at IP,27012,27013, I have changed the configuration as mentioned in the lecture. video URL - https://university.mongodb.com/mercury/M103/2020_March_31/chapter/Chapter_3_Sharding/lesson/5aa31ec196f30f818591a5a0/lecture

Below image for the replica set configuration

Below image is for the Config Sever Replica Set and all three configs are connected to a replica set

Now connected to mongos and trying to add the primary replica set on port 27012 as my first shard. but it was not able to add

Can you please guide me to resolve my issue

You will not be able to verify that lab with this configuration.

But for your current configuration you still have:

because yours is called m103-example.

You really should stick to the lab and use the IDE.

Actually I have completed this chapter in IDE but I am trying this to do it locally in PC for learning purpose and not able to do that

Here is the mongos log file data captured while running the command sh.addShard(“m103-repl/”)

Kindly guide me to add shard

I think you are using wrong replicaset name while adding addShard
m103-repl vs m103-example
That is what steevej-1495 mentioned in his reply

Please check your steps