user23750
user23750

Reputation: 268

Not reachable/healthy Replica Set

I am trying to add one more replica set in existing sets and getting problem in reachability. What are the reasons when we get Not reachable/healthy replica set ?

    "name" : "IP ADDRESS",
    "health" : 0,
    "state" : 8,
    "stateStr" : "(not reachable/healthy)",
    "uptime" : 0,
    "optime" : {
        "t" : 0,
        "i" : 0
    },
    "optimeDate" : ISODate("1970-01-01T00:00:00Z"),
    "lastHeartbeat" : ISODate("2013-06-18T10:52:50Z"),
    "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
    "pingMs" : 0

Upvotes: 5

Views: 20740

Answers (4)

Taranpreet Matharu
Taranpreet Matharu

Reputation: 11

This issue in my case happened when it seems that after replicaSet was created the primary could not reach secondary on 27017(or any other configured port).

Writing the data on primary was fine and even the secondaries also synced the data from the primary. I wonder if the secondary tail the oplog of primary on some other port, other than the ones configured in replicaSet configuration

Upvotes: 1

Vaseem007
Vaseem007

Reputation: 2531

I could ping and telnet both server but facing the same issue.

Error I was getting "[ReplicationExecutor] Error in heartbeat request to prodmongo:27017; HostUnreachable Connection refused"

Also I had the "(not reachable/healthy)" stateStr

Please check the key on both server, all replica set should run with same key. I had the same issue and I found that key was not identical in my secondary server.

Upvotes: 1

virender
virender

Reputation: 4647

I also faced similar type of problem. But solved

  1. If replication server is different then first check mongodb access from other server. Check that mongodb port is opened.

For that I connected mongodb server from other server

  1. Second case In my case I started mongodb without "replSet" , its given me problem of "Not reachable/healthy Replica Set" for solve this problem

I again started mongodb with "--replSet" on other computer where my mongodb running. then run rs.add("ServerName:PortNumber") on Master replication Server.

!worked for me

Upvotes: 0

Related Questions