I searched on stack overflow couldn't find the solution for it.
I've 3 nodes 1 primary and 2 secondary nodes like, mongo1.com
, mongo2.com
and mongo3.com
.
Everything is working well with the connection. When I shutdown anyone node, e.g. mongo1.com
, my app is working fine. Again I shutdown 2nd node e.g. mongo3.com
then app stopped working. In case I enable anyone node enable then app again working fine.
In short, with single node app not working. Looking for guideline / answer for the behaviour.
I checked status using rs.status()
, two node show me health: 0
and message: unreachable node
.
Third node which is active show health: 1
and "infoMessage" : "could not find member to sync from"
I did multiple research and found that if 2 node shutdown then you can manually made running node as primary.
To have a primary in a 3 node replica set at least 2 nodes must be operational.