I am trying to install a replica set with two nodes: Node0 and Node1. From Node0, I initialized a replica set named "rs0" and added Node1 to it. The problem is that it is added as a primary node instead of a secondary node, and the end result is a set of replicas with two primary nodes.
This is the result of the rs.status() command from Node0
"set" : "rs0", "date" : ISODate("2012-10-23T21:03:37Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "Node0:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 61185, "optime" : Timestamp(1350967947000, 1), "optimeDate" : ISODate("2012-10-23T04:52:27Z"), "self" : true }, { "_id" : 1, "name" : "Node1:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 58270, "optime" : Timestamp(1350956423000, 1), "optimeDate" : ISODate("2012-10-23T01:40:23Z"), "lastHeartbeat" : ISODate("2012-10-23T21:03:37Z"), "pingMs" : 0 } ],
If I execute the same command from Node1, then only the specified node itself. Note that pingMs is 0. Attempting to add a third node or arbiter to give similar results: each of them is added as primary, and pingMS is always 0.
source share