M103 "errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded:

“errmsg” : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded:

Please check our forum.You will get clues
You must be getting this while rs.add
Make sure the host you are adding is reachable(ping)

1 Like

Am creating the replicaset on a local host

What does your configuration / initiate command look like?

And as to @Ramachandra_37567 suggestion here are some posts to look at

Any solution yet ? i faced the same problem

members are still 1

why there is a difference between video tutorial and instructions under it ?

Appreciate your support
Regards

Update its working when i changed net.bindIp

But its not right solution for this course we need to understand how to open firewall between nodes

rs.stepDown()

Hi @ahmedyounes,

Please set the permissions to 400 as has been instructed in the lecture notes shown in the snippet below:

Also, for your issue with rs.add, please refer to the following post:

Thanks,
Muskan
Curriculum Support Engineer

1 Like

In the next Lab i successfully added nodes to replica set .

Thanks for your reply .
Appreciated
Regards Ahmed

Hi, I still have the issue. I don’t see how firewall would the problem, a we are starting is mongod process all in the same host. I am not using server name, just hard-code IP address and “localhost”. After bringing up the second and third mongod processes, I did telnet test and on 192.168.103.100, both ports 27002 and 27003 are listening. So it is not as the other 2 mongod processes are not responsive. So I am not sure why I get the following error message when I try my rs.add:

MongoDB Enterprise m103-repl:PRIMARY> rs.add(“192.168.103.100:27002”)
{
“ok” : 0,
“errmsg” : “Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: 192.168.103.100:27001; the following nodes did not respond affirmatively: 192.168.103.100:27002 failed with Couldn’t get a connection within the time limit”,
“code” : 74,
“codeName” : “NodeNotFound”,
“operationTime” : Timestamp(1576794064, 1),
“$clusterTime” : {
“clusterTime” : Timestamp(1576794064, 1),
“signature” : {
“hash” : BinData(0,“24eDdQF5NfrsZdFNWZWXcfx6ySI=”),
“keyId” : NumberLong(“6772265790512037889”)
}
}
}

The message indicates that connections to 192.168.103.100, on port 27002 fails, which is does not make any sense.

I also changed the permission on the keyfile to 400, instead of 600 and that didn’t make a difference.

here is the result of rs.status():

MongoDB Enterprise m103-repl:PRIMARY> rs.status()
{
“set” : “m103-repl”,
“date” : ISODate(“2019-12-19T22:37:52.580Z”),
“myState” : 1,
“term” : NumberLong(1),
“syncingTo” : “”,
“syncSourceHost” : “”,
“syncSourceId” : -1,
“heartbeatIntervalMillis” : NumberLong(2000),
“optimes” : {
“lastCommittedOpTime” : {
“ts” : Timestamp(1576795064, 1),
“t” : NumberLong(1)
},
“readConcernMajorityOpTime” : {
“ts” : Timestamp(1576795064, 1),
“t” : NumberLong(1)
},
“appliedOpTime” : {
“ts” : Timestamp(1576795064, 1),
“t” : NumberLong(1)
},
“durableOpTime” : {
“ts” : Timestamp(1576795064, 1),
“t” : NumberLong(1)
}
},
“members” : [
{
“_id” : 0,
“name” : “192.168.103.100:27001”,
“health” : 1,
“state” : 1,
“stateStr” : “PRIMARY”,
“uptime” : 4126,
“optime” : {
“ts” : Timestamp(1576795064, 1),
“t” : NumberLong(1)
},
“optimeDate” : ISODate(“2019-12-19T22:37:44Z”),
“syncingTo” : “”,
“syncSourceHost” : “”,
“syncSourceId” : -1,
“infoMessage” : “”,
“electionTime” : Timestamp(1576791002, 2),
“electionDate” : ISODate(“2019-12-19T21:30:02Z”),
“configVersion” : 1,
“self” : true,
“lastHeartbeatMessage” : “”
}
],
“ok” : 1,
“operationTime” : Timestamp(1576795064, 1),
“$clusterTime” : {
“clusterTime” : Timestamp(1576795064, 1),
“signature” : {
“hash” : BinData(0,“SeCYoTFIn9i8KMB27ipO2c0Pqhg=”),
“keyId” : NumberLong(“6772265790512037889”)
}
}
}

Any help on this issue is greatly appreciated.

Best regards,
Roya Yazdani

Hi @Roya_70671,

Try to add the node using the localhost or 127.0.0.1:
rs.add("localhost:27002") or rs.add("127.0.0.1:27002")

Also, let’s see the output of the following:

  1. ps -ef | grep [m]ongo
  2. ls -l /var/mongodb/pki/
  3. ls -ld /var/mongodb/pki/

Hi @007_jb,

Thanks for suggestion. Unfortunately, it didn’t work:

MongoDB Enterprise m103-repl:PRIMARY> rs.add(“127.0.0.1:27002”)
{
“ok” : 0,
“errmsg” : “Either all host names in a replica set configuration must be localhost references, or none must be; found 1 out of 2”,
“code” : 103,
“codeName” : “NewReplicaSetConfigurationIncompatible”,
“operationTime” : Timestamp(1576811806, 1),
“$clusterTime” : {
“clusterTime” : Timestamp(1576811806, 1),
“signature” : {
“hash” : BinData(0,“P/57JRT59ynZeKFlagmVxl1zUZY=”),
“keyId” : NumberLong(“6772265790512037889”)
}
}
}

I get the same result if I use rs.add(“localhost:27002”)

Here are the result of running the next 3 commands:

vagrant@m103:~ ps -ef | grep [m]ongo vagrant 7701 1 2 Dec19 ? 00:07:04 mongod -f mongod-repl-1.conf vagrant 8183 1 0 Dec19 ? 00:02:45 mongod -f mongod-repl-2.conf vagrant@m103:~

I killed the 3rd mongod process earlier, trying to concentrate on adding at least the second node. So “grep” wouldn’t have the 3rd mongod.

vagrant@m103:~ ls -l /var/mongodb/pki/ total 4 -r-------- 1 vagrant vagrant 1004 Dec 19 21:19 m103-keyfile vagrant@m103:~

vagrant@m103:~ ls -ld /var/mongodb/pki/ drwxr-xr-x 2 vagrant vagrant 4096 Dec 19 21:19 /var/mongodb/pki/ vagrant@m103:~

Best regards,
Roya

The error message makes sense.

Login to the 27001 and 27002 nodes, run the following command and show us both screenshots:
db.adminCommand({getCmdLineOpts: 1})

Also, from the Primary replica set, run the following and share the screenshot:
rs.config()

PS: I struggled a bit to read the output because it was misaligned. Probably better to show screenshots next time or try and line them up after pasting for brevity.

Here is the results or running this on node3 (i.e. port 27003):

Basically it is telling me that I am not authorized to run this command on node3.

I get the same thing on node 2 (i.e. port 27002).

On node 1 (port 27001), I get the following:

Can my problem be authorization issue?

Thanks,
Roya

Potentially! But first, did you login/authenticate with a username/password on the primary (27001) before running the command?

Let’s see screenshots of the 27001 and 27002 config files.

Nothing looks out of place. And fyi, if you have authentication enabled and all your nodes are using the same pki file, you must authenticate with login credentials each time you login to any of the nodes. That was why the adminCommand from earlier didn’t work.

Also, feel free to delete your last post so you’re not revealing lab answers to other course takers.

Let’s see this :arrow_up: as well.

Lastly, from your Primary replica set, attempt rs.add() again, logout, then take a screenshot of the tail/last couple of lines of the Primary log file, i.e. /var/mongodb/db/mongod1.log.