{ "ok" : 1 }
{
"set" : "rsABC",
"date" : ISODate("2016-01-21T22:13:11.330Z"),
"myState" : 2,
"term" : NumberLong(5),
"heartbeatIntervalMillis" : NumberLong(2000),
"members" : [
{
"_id" : 0,
"name" : "mongo-1-uf5mk:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 4821,
"optime" : {
"ts" : Timestamp(1453414352, 1),
"t" : NumberLong(5)
},
"optimeDate" : ISODate("2016-01-21T22:12:32Z"),
"infoMessage" : "could not find member to sync from",
"configVersion" : 247065,
"self" : true
},
{
"_id" : 1,
"name" : "10.2.28.2:27017",
"health" : 1,
"state" : 0,
"stateStr" : "STARTUP",
"uptime" : 28,
"optime" : {
"ts" : Timestamp(0, 0),
"t" : NumberLong(-1)
},
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" : ISODate("2016-01-21T22:13:07.594Z"),
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
"pingMs" : NumberLong(8),
"configVersion" : -2
}
],
"ok" : 1
}
{
"info" : "run rs.initiate(...) if not yet done for the set",
"ok" : 0,
"errmsg" : "no replset config has been received",
"code" : 94
}
Hi Stephen,
Make sure you only use rs.initiate() on the intended primary node. See Deploy Replica Set for detailed steps.
Also, make sure to test the connections between the nodes.
For consistency, you should use either all IP addresses or hostnames in your replica set. i.e. 10.2.28.2 or mongo-1-uf5mk.
If you are still having issues with setting up a replica set, could you provide the following information:
You may also find Replica Set Tutorials a useful read.
Regards,
Wan.
Hi Natarajan,
Although you may share a similar error message, it may be a different issue that is causing it.
Could you please start a new disccusion with relevant details of:
You may find these useful:
Regards,
Wan.
Hi Avishek
Me too facing the same issue.
Please note that you are replying to an old thread that is almost certain to have a different cause, although the symptom might look similar at first glance.
If you’re still having an issue, could you please open a new thread with more details. In the new thread, could you post:
mongod processes are running within one server, virtualized or otherwise)mongod logs showing at the time of the issuemongo shell, etc.)rs.status() (since this appears to be a replica set)Providing detailed information regarding your situation and your goal would help the community to quickly ascertain the source of the problem, and hopefully provide a solution that can achieve your goal.
Best regards,
Kevin