Lab: Deploy a Replica Set -- cfg is undefined error

Hello all,

I was able to run 3 mongod instances, and add the m103-admin to the primary node. But after connecting to the primary with the following command

mongo --host "m103-repl/localhost:27001" -u "m103-admin" -p "m103-pass" --authenticationDatabase "admin"

After that I get an issue with running rs.add(). When I run it it throws the following error

m103-repl:PRIMARY> rs.add()
2020-10-03T12:01:11.740+0000 E QUERY [js] TypeError: cfg is undefined :


Figured out the answer. I wasn’t passing in the host name into rs.add()