MongoDB new replica set node not coming online

mongodb

After adding a new MongoDB replica set node on the primary I get

> rs.status()
{
...
        {
            "_id" : 2,
            "name" : "nde3.test.com:27017",
            "health" : 1,
            "state" : 6,
            "stateStr" : "UNKNOWN",
            "uptime" : 129,
            "optime" : {
                "t" : 0,
                "i" : 0
            },
            "optimeDate" : ISODate("1970-01-01T00:00:00Z"),
            "lastHeartbeat" : ISODate("2013-06-06T13:01:30Z"),
            "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
            "pingMs" : 64,
            "lastHeartbeatMessage" : "still initializing"
        }
    ],
...
}

and on the new node I get

> rs.status()
{
    "startupStatus" : 4,
    "ok" : 0,
    "errmsg" : "can't currently get local.system.replset config from self or any seed (EMPTYUNREACHABLE)"
}

Best Answer

There was a typo in my `/etc/hosts/' on the new replica set node

Example

nde3.test.com       1.1.1.1

should have been

nde3.test.com       1.1.1.2
Related Topic