Connect to a replicaset

This is not a valid configuration/setup.Minimum 3 nodes are needed
You need majority voting members up to elect a new primary
Check this link

Setup a 2 node mongodb replica set

2 Likes