Unable to reach primary for set m103-repl

Hi - in the Lab: Deploy a Replica Set, I had issues connecting to a mongodb node, below you can see the commands that i have used, any ideas what im doing wrog?

step 6
Reconnect to your primary node as m103-admin and add the other two nodes to your replica set using rs.add()

Commands I have used and they have not worked:

mongo --port 27001 -u “m103-admin” -p “m103-pass” --authenticationDatabase "admin"

mongo --host “m103-repl/192.168.103.100:27001” -u “m103-admin” -p “m103-pass” --authenticationDatabase "admin"

image

connecting to: mongodb://192.168.103.100:27001/?authSource=admin&gssapiServiceName=mongodb&replicaSet=m103-repl
2020-09-01T18:56:15.239+0000 I NETWORK [js] Starting new replica set monitor for m103-repl/192.168.103.100:27001
2020-09-01T18:56:20.270+0000 W NETWORK [js] Unable to reach primary for set m103-repl
2020-09-01T18:56:20.270+0000 I NETWORK [js] Cannot reach any nodes for set m103-repl. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2020-09-01T18:56:25.775+0000 W NETWORK [js] Unable to reach primary for set m103-repl
2020-09-01T18:56:25.775+0000 I NETWORK [js] Cannot reach any nodes for set m103-repl. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2020-09-01T18:56:31.281+0000 W NETWORK [js] Unable to reach primary for set m103-repl
2020-09-01T18:56:31.281+0000 I NETWORK [js] Cannot reach any nodes for set m103-repl. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.
2020-09-01T18:56:31.281+0000 E QUERY [js] Error: connect failed to replica set m103-repl/192.168.103.100:27001 :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed

Why do you try to connect to 192.168.103.100? The configuration files specify localhost.

Show the screenshot when using localhost.

Hi @Aracely_23723,

This :point_down:t2:

192.168.103.100 is not a valid IP address in the In-browser IDE environment. Please read the instructions mentioned in the lab carefully.

Let us know if you have any doutbs/questions.

~ Shubham

Thank you guys
i have start over and i had success

Hi @Aracely_23723,

I’m glad that your issue got resolved. I’m closing this thread. Please feel free to create a new thread if you have any other issues.

~ Shubham