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.
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:
I then start 1 of my mongod using it’s corresponding config file as follows:
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.
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.
Finally, I run the validation script from the vagrant command and it throws following error:
Please help me resolve this error… I am not able to do next lab, unless and until I finish this lab.