Lab - Initiate a Replica Set Locally (validation script fails)

Hi,

I have seen other threads on this issue, but I haven’t found a solution to this problem yet. Hence putting this post. Please help to close this. I get the following message when I run the validation script for this lab:

Client experienced a timeout when connecting to the database - check that mongod
processes are running on ports 27001, 27002 and 27003, and that the 'm103-admin’
user authenticates against the admin database.

Here are my 3 configuration files for the 3 mongod’s that will make up the replication set.

mongod-repl-1.conf

image

mongod-repl-2.conf

image

mongod-repl-3.conf

image

I have created the dbpath for all 3 mongod’s as follows:

My keyFile for mongod’s to authenticate each other is also available as follows:

image

I then start 1 of my mongod using it’s corresponding config file as follows:

image

Next, I use a mongo shell to connect to my mongod, and then (a) initiate the replica set and (b) create a user on admin db with role as root

Next, I exit out of mongo shell, and connect back with the newly created user

Next, I start up 2 more mongod’s using my other 2 config files.

image
image

Next, I go back to my mongo shell for Primary Mongod node and add the 2 newly added mongods to the replica set.

I fire the rs.status() and rs.isMaster() commands, and all looks good.

image

image

Finally, I run the validation script from the vagrant command and it throws following error:

image

Please help me resolve this error… I am not able to do next lab, unless and until I finish this lab.

Hi @PuneetC,

It is recommended to follow the exact requirements for the lab, otherwise running validation script will show error.

As I can check from your screenshots, you have used incorrect replicaSet name. Please correct it and follow all the steps mentioned in the lab as it is.

Please let me know, if you have any other issue.

For now, I am removing the screenshots that you have shared as there might me other users who are still doing this lab and it would not be fair for them if we share steps/answers here. In future, if you have any such problem, please feel free to message me in discourse.

Kindest Regards,
Sonali

Thank you Sonali… the input that you provided worked out fine. You took just 2 mins to point me in the right direction, for something that I was sitting on for almost 2 days. :slight_smile:

However, I have some feedback here. The output of the validation script viz. “Client experienced a timeout when connecting to the database - check that mongod processes are running on ports 27001, 27002 and 27003, and that the 'm103-admin’ user authenticates against the admin database.” had nothing to do with the actual issue.

It would be good if the validation scripts point out the actual issue, rather than an error message, that has nothing to do with the original issue. The error message made me take the wrong direction for analyzing the issue…

However, thank you once again… :slight_smile: