Cannot connect to Replica Set from GCP VM

are you able to connect to one of your instances directly to check the replica set configuration?

you can connect to one directly by doing:

mongo --host <primary-node-ip>:27017

you can do that by doing this:

rs.status()
rs.conf()

i made the assumption that you’re on the default port, (you’ll also need to add in the authentication to that command like username and password)

1 Like