api_umbrella:PRIMARY> rs.add("pocmysql002iad.io.askjeeves.info:14001");
{
"ok" : 0,
"errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: pocmysql001iad.io.askjeeves.info:14001; the following nodes did not respond affirmatively: pocmysql002iad.io.askjeeves.info:14001 failed with Received heartbeat from member with the same member ID as ourself: 0",
"code" : 74
}
When i tried to debug this issue got to know secondary became kind of primary after firing rs.initiate() and both of them have _id=0 so they can not be the part of same replicates and solution was to stop mongo clean the data directory and restart the mongod so it will behave as new instance and then do the rs.add on primary for this node.
I am looking for some kind of cookbook/recipe where it can create the primary and 2 secondary without any manual work, is it possible or do we have such kind of cookbook/recipe?
Thanks,
Amit
Hi Amit,
1) I created first node with installation of mongodb with ReplicatSetName in /etc/mongod.comf and did the rs.initiate(), so it became primary.
2) I used the same recipe to create 2 secondary but once those have rs.initiate() executed they can not be the secondary on replicaset and i get following error.
You ran rs.initiate() three times (on for each host). You should have run the command only once per replica set. Please refer to Deploy a Replica Set for more details.
Regards,
Lungang