Firstly is there a typo in the lab notes? It says to add the first shard:
sh.addShard(“m103-repl/192.168.103.100:27001”)
But the m103-repl replica set nodes are running on 192.168.103.100:27011/27012/27013
Secondly the validation scripts fails with an error:
vagrant@m103:~$ validate_lab_first_sharded_cluster
Client experienced a timeout when connecting to ‘m103-repl’ - check that mongod/mongos
processes are running on the correct ports, and that the ‘m103-admin’ user
authenticates against the admin database.
But I can connect to the replica set:
mongo --host “m103-repl/192.168.103.100:27012” -u “m103-admin” -p “m103-pass” --authenticationDatabase “admin”
MongoDB shell version v3.6.14
connecting to: mongodb://192.168.103.100:27012/?authSource=admin&gssapiServiceName=mongodb&replicaSet=m103-repl
2019-09-04T15:39:16.734+0000 I NETWORK [thread1] Starting new replica set monitor for m103-repl/192.168.103.100:27012
2019-09-04T15:39:16.735+0000 I NETWORK [thread1] Successfully connected to 192.168.103.100:27012 (1 connections now open to 192.168.103.100:27012 with a 5 second timeout)
2019-09-04T15:39:16.736+0000 I NETWORK [thread1] changing hosts to m103-repl/192.168.103.100:27011,192.168.103.100:27012,192.168.103.100:27013 from m103-repl/192.168.103.100:27012
2019-09-04T15:39:16.736+0000 I NETWORK [ReplicaSetMonitor-TaskExecutor-0] Successfully connected to 192.168.103.100:27013 (1 connections now open to 192.168.103.100:27013 with a 5 second timeout)
2019-09-04T15:39:16.738+0000 I NETWORK [ReplicaSetMonitor-TaskExecutor-0] Successfully connected to 192.168.103.100:27011 (1 connections now open to 192.168.103.100:27011 with a 5 second timeout)
Implicit session: session { “id” : UUID(“f63509ef-6f23-4512-b894-0488821ee32e”) }
MongoDB server version: 3.6.14
Server has startup warnings:
2019-09-04T15:31:17.087+0000 I STORAGE [initandlisten]
2019-09-04T15:31:17.087+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2019-09-04T15:31:17.087+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2019-09-04T15:31:17.934+0000 I CONTROL [initandlisten]
2019-09-04T15:31:17.934+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is ‘always’.
2019-09-04T15:31:17.934+0000 I CONTROL [initandlisten] ** We suggest setting it to ‘never’
2019-09-04T15:31:17.934+0000 I CONTROL [initandlisten]
2019-09-04T15:31:17.934+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ‘always’.
2019-09-04T15:31:17.934+0000 I CONTROL [initandlisten] ** We suggest setting it to ‘never’
2019-09-04T15:31:17.934+0000 I CONTROL [initandlisten]
MongoDB Enterprise m103-repl:PRIMARY>
Confused and a bit downhearted to be honest