HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Mongodb Replica Member Server Changed: Status Stuck In STARTUP. Missing config

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
replicastuckmongodbstatusmemberconfigmissingserverstartupchanged

Problem

I am on mongo v3.0.x and have a replication set with 3 members, but the second member (and entire server) was unexpectedly taken down and destroyed. I have stood up a new server to use as a replacement for the the second member and need help bringing it back to a working state. I am not sure if this is the proper way to bring a member back in, even though they have the same address (mongochat02).

Do I need to do a rs.reconfig() or remove(mongochat02) and add(mongochat02) again? Or am I supposed to follow a different procedure to get this member working?

When I issue rs.status():

```
001-rs:PRIMARY> rs.status()
{
"set" : "001-rs",
"date" : ISODate("2017-04-07T19:39:23.860Z"),
"myState" : 1,
"term" : NumberLong(-1),
"heartbeatIntervalMillis" : NumberLong(2000),
"members" : [
{
"_id" : 0,
"name" : "mongochat01:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 174004,
"optime" : Timestamp(1491593961, 4),
"optimeDate" : ISODate("2017-04-07T19:39:21Z"),
"lastHeartbeat" : ISODate("2017-04-07T19:39:22.386Z"),
"lastHeartbeatRecv" : ISODate("2017-04-07T19:39:21.977Z"),
"pingMs" : NumberLong(0),
"syncingTo" : "mongochat03:27017",
"configVersion" : 3
},
{
"_id" : 1,
"name" : "mongochat02: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-04-07T19:39:23.672Z"),
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
"pingMs" : NumberLong(0),
"lastHeartbeatMessage" : "Operation timed out",
"configVersion" : -1
},
{
"_id" : 2,

Solution

Yes, problems is connection between nodes using port 27017. So, check firewall, because something is blocking traffic between nodes.

Fastest and best way to bring up that mongochat02 node is make snapshot of mongochat01 or 03 (dbpath) filesystem and copy that to mongochat02.

Sure, you can make initial sync too, but it is the slowest way. Creating empty mongodb node and set replset to right name.

Anyway, as long as this mongochat02 is on same (old) IP address, you don't need to remove and add it to the replica set.

Context

StackExchange Database Administrators Q#169497, answer score: 2

Revisions (0)

No revisions yet.