[SERVER-29440] secondary's state problem Created: 03/Jun/17  Updated: 03/Jun/17  Resolved: 03/Jun/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.2.6
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Weiping Ye [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

I have a 3 node Replica Set.
On primary node, i run rs.status(), the output was:

xms_rs0:PRIMARY> rs.status()
{
  "set" : "xms_rs0",
  "date" : ISODate("2017-06-03T16:35:19.008Z"),
  "myState" : 1,
  "term" : NumberLong(-1),
  "heartbeatIntervalMillis" : NumberLong(2000),
  "members" : [
    {
      "_id" : 5,
      "name" : "iZ23e49lzy2Z:27017",
      "health" : 1,
      "state" : 1,
      "stateStr" : "PRIMARY",
      "uptime" : 34128390,
      "optime" : Timestamp(1496507718, 2),
      "optimeDate" : ISODate("2017-06-03T16:35:18Z"),
      "electionTime" : Timestamp(1466650419, 1),
      "electionDate" : ISODate("2016-06-23T02:53:39Z"),
      "configVersion" : 19,
      "self" : true
    },
    {
      "_id" : 6,
      "name" : "iZ23d75sz7dZ:27017",
      "health" : 1,
      "state" : 2,
      "stateStr" : "SECONDARY",
      "uptime" : 34122123,
      "optime" : Timestamp(1496507717, 1),
      "optimeDate" : ISODate("2017-06-03T16:35:17Z"),
      "lastHeartbeat" : ISODate("2017-06-03T16:35:17.050Z"),
      "lastHeartbeatRecv" : ISODate("2017-06-03T16:35:17.938Z"),
      "pingMs" : NumberLong(1),
      "syncingTo" : "iZ23e49lzy2Z:27017",
      "configVersion" : 19
    },
    {
      "_id" : 7,
      "name" : "iZ23nllfeopZ:27017",
      "health" : 0,
      "state" : 8,
      "stateStr" : "(not reachable/healthy)",
      "uptime" : 0,
      "optime" : Timestamp(0, 0),
      "optimeDate" : ISODate("1970-01-01T00:00:00Z"),
      "lastHeartbeat" : ISODate("2017-06-03T16:35:11.262Z"),
      "lastHeartbeatRecv" : ISODate("2017-06-03T16:35:17.046Z"),
      "pingMs" : NumberLong(1),
      "lastHeartbeatMessage" : "Couldn't get a connection within the time limit",
      "configVersion" : -1
    }
  ],
  "ok" : 1
}

it show that node iZ23nllfeopZ:27017 is "not reachable", and there are some warning messages in the log:

REPL     [ReplicationExecutor] Error in heartbeat request to iZ23nllfeopZ:27017; ExceededTimeLimit: Couldn't get a connection within the time limit

when i run rs.status() on iZ23nllfeopZ:

xms_rs0:SECONDARY> rs.status()
{
  "set" : "xms_rs0",
  "date" : ISODate("2017-06-03T16:27:06.731Z"),
  "myState" : 2,
  "term" : NumberLong(-1),
  "syncingTo" : "iZ23d75sz7dZ:27017",
  "heartbeatIntervalMillis" : NumberLong(2000),
  "members" : [
    {
      "_id" : 5,
      "name" : "iZ23e49lzy2Z:27017",
      "health" : 1,
      "state" : 1,
      "stateStr" : "PRIMARY",
      "uptime" : 60,
      "optime" : Timestamp(1496507226, 4),
      "optimeDate" : ISODate("2017-06-03T16:27:06Z"),
      "lastHeartbeat" : ISODate("2017-06-03T16:27:06.434Z"),
      "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
      "pingMs" : NumberLong(1),
      "electionTime" : Timestamp(1466650419, 1),
      "electionDate" : ISODate("2016-06-23T02:53:39Z"),
      "configVersion" : 19
    },
    {
      "_id" : 6,
      "name" : "iZ23d75sz7dZ:27017",
      "health" : 1,
      "state" : 2,
      "stateStr" : "SECONDARY",
      "uptime" : 60,
      "optime" : Timestamp(1496507226, 4),
      "optimeDate" : ISODate("2017-06-03T16:27:06Z"),
      "lastHeartbeat" : ISODate("2017-06-03T16:27:06.434Z"),
      "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
      "pingMs" : NumberLong(1),
      "syncingTo" : "iZ23e49lzy2Z:27017",
      "configVersion" : 19
    },
    {
      "_id" : 7,
      "name" : "iZ23nllfeopZ:27017",
      "health" : 1,
      "state" : 2,
      "stateStr" : "SECONDARY",
      "uptime" : 69,
      "optime" : Timestamp(1496507226, 6),
      "optimeDate" : ISODate("2017-06-03T16:27:06Z"),
      "syncingTo" : "iZ23d75sz7dZ:27017",
      "infoMessage" : "syncing from: iZ23d75sz7dZ:27017",
      "configVersion" : 19,
      "self" : true
    }
  ],
  "ok" : 1
}

it seems that iZ23nllfeopZ is normal.



 Comments   
Comment by Kelsey Schubert [ 03/Jun/17 ]

Hi Weiping Ye,

Thanks for your report. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group.

Kind regards,
Thomas

Generated at Thu Feb 08 04:20:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.