Skip to content

Instantly share code, notes, and snippets.

@marianogg9
Created January 11, 2017 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marianogg9/984683c8a00f553ffea021aa48e52c30 to your computer and use it in GitHub Desktop.
Save marianogg9/984683c8a00f553ffea021aa48e52c30 to your computer and use it in GitHub Desktop.
rs0:PRIMARY> rs.status()
{
"set" : "rs0",
"date" : ISODate("2017-01-11T20:36:56.579Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "primary_hostname:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 109490,
"optime" : Timestamp(1484152641, 1),
"optimeDate" : ISODate("2017-01-11T16:37:21Z"),
"electionTime" : Timestamp(1484057586, 2),
"electionDate" : ISODate("2017-01-10T14:13:06Z"),
"configVersion" : 3,
"self" : true
},
{
"_id" : 1,
"name" : "arbiter_hostname:27017",
"health" : 1,
"state" : 0,
"stateStr" : "STARTUP",
"uptime" : 1938,
"lastHeartbeat" : ISODate("2017-01-11T20:36:56.377Z"),
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
"pingMs" : 0,
"configVersion" : -2
},
{
"_id" : 2,
"name" : "secondary_hostname:27017",
"health" : 1,
"state" : 0,
"stateStr" : "STARTUP",
"uptime" : 1044,
"optime" : Timestamp(0, 0),
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" : ISODate("2017-01-11T20:36:55.527Z"),
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
"pingMs" : 0,
"configVersion" : -2
}
],
"ok" : 1
}
in secondary
> rs.status()
{
"info" : "run rs.initiate(...) if not yet done for the set",
"ok" : 0,
"errmsg" : "no replset config has been received",
"code" : 94
}
arbiter
> rs.status()
{
"info" : "run rs.initiate(...) if not yet done for the set",
"ok" : 0,
"errmsg" : "no replset config has been received",
"code" : 94
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment