Change port 27017 to PRIMARY

so i have my port 27017 and it is secondary (i’ve done something in the past to it but i forgot), i cant change it back to primary. Plz help me
( I have try rs.stepDown() and reconfig but it always said that cant run those command on secondary must be on primary)
This is my rs.status()

How can I change the 27017 to Primary.

In the current state you can’t, and the reason is because you only have 1 of 3 nodes available. When you don’t have a majority of nodes healthy the cluster can’t have a primary. You need to bring up one of the other nodes to a healthy state. Then you will have 2 of 3 nodes up so you will have a Primary and a Secondary.


Thanks, well i guess i have to reinstall it all again.

Why do you have to reinstall? Can you not just start the mongod processes on the server?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.