set1:PRIMARY> rs.status()
{
"set" : "set1",
"date" : ISODate("2017-01-14T07:14:36.974Z"),
"myState" : 1,
"term" : NumberLong(2),
"heartbeatIntervalMillis" : NumberLong(2000),
"optimes" : {
"lastCommittedOpTime" : {
"ts" : Timestamp(1484378072, 1),
"t" : NumberLong(2)
},
"appliedOpTime" : {
"ts" : Timestamp(1484378072, 1),
"t" : NumberLong(2)
},
"durableOpTime" : {
"ts" : Timestamp(1484378072, 1),
"t" : NumberLong(2)
}
},
"members" : [
{
"_id" : 0,
"name" : "xxxxxxx:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 26,
"optime" : {
"ts" : Timestamp(1484378072, 1),
"t" : NumberLong(2)
},
"optimeDate" : ISODate("2017-01-14T07:14:32Z"),
"infoMessage" : "could not find member to sync from",
"electionTime" : Timestamp(1484378051, 1),
"electionDate" : ISODate("2017-01-14T07:14:11Z"),
"configVersion" : 1,
"self" : true
}
],
"ok" : 1
}
Your port number maybe different, and you need the majority of your nodes to be healthy to have a primary, but you find the right settings in local.db.system.replset
Best,
Attila