0

I want to create a simple mongodb cluster but while I am trying to add another shard it is throwing an error.

rs0:PRIMARY> rs.add("node75:27017")

{
"ok" : 0,

"errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: node73:27017; the following nodes did not respond affirmatively: node75:27017 failed with Received heartbeat from member with the same member ID as ourself: 0",

"code" : 74,

"codeName" : "NodeNotFound"
}
1

First.. You are not adding another shard, just new replica set member. Error means that this (primary) could not connect that "node75" at port 27017 to check that it is live.

Problem is probably that, that this name node75 cannot be resolved. There is no IP address for that name.

Try to add line to /etc/resolv.conf

xxx.xxx.xxx.xxx  node75

where that xxx is IP address of that machine.

Or use IP-address at that rs.add("xxx.xxx.xxx.xxx:27017")

Of course you need to check that firewall (at node75) is open for that port 27017.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.