Reputation: 268
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
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
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
Reputation: 4647
I also faced similar type of problem. But solved
For that I connected mongodb server from other server
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
Reputation: 4569
similar problem i had , the solution was to have a keyfile. http://docs.mongodb.org/manual/tutorial/deploy-replica-set-with-auth/#create-the-key-file-to-be-used-by-each-member-of-the-replica-set
Upvotes: 3