Could not add second node to csrs replica set: Quorum check failed

  1. I started csrs replica set nodes in port 26001 and 26002.
  2. I login in 26001 (Primary)
  3. Try to add 26002 with replica set. Which gives the below error.

switched to db admin
MongoDB Enterprise m103-csrs:PRIMARY> db.getUsers()
[
{
“_id” : “admin.m103-admin”,
“userId” : UUID(“9f8a25b1-875c-442d-8dc0-874565908171”),
“user” : “m103-admin”,
“db” : “admin”,
“roles” : [
{
“role” : “root”,
“db” : “admin”
}
]
}
]

MongoDB Enterprise m103-csrs:PRIMARY>
MongoDB Enterprise m103-csrs:PRIMARY> db.auth(“m103-admin”, “m103-pass”)
1
MongoDB Enterprise m103-csrs:PRIMARY>
MongoDB Enterprise m103-csrs:PRIMARY> rs.add(“192.168.103.100:26002”)
{
“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:26001; the following nodes did not respond affirmatively: 192.168.103.100:26002 failed with not authorized on admin to execute command { replSetHeartbeat: “m103-csrs”, configVersion: 2, hbv: 1, from: “192.168.103.100:26001”, fromId: 0, term: 1, $replData: 1, $clusterTime: { clusterTime: Timestamp(1582457441, 1), signature: { hash: BinData(0, 8B236FB0AC779951442FD728D4DC0CEB7533A987), keyId: 6796526497399046172 } }, $db: “admin” }”,
“code” : 74,
“codeName” : “NodeNotFound”,
“operationTime” : Timestamp(1582457441, 1),
“$gleStats” : {
“lastOpTime” : Timestamp(0, 0),
“electionId” : ObjectId(“7fffffff0000000000000001”)
},
“$clusterTime” : {
“clusterTime” : Timestamp(1582457441, 1),
“signature” : {
“hash” : BinData(0,“AAAAAAAAAAAAAAAAAAAAAAAAAAA=”),
“keyId” : NumberLong(0)
}
}
}
MongoDB Enterprise m103-csrs:PRIMARY>

Configurations:

vagrant@m103:~/M103/Sharding$ cat csrs_1.conf
sharding:
clusterRole: configsvr
replication:
replSetName: m103-csrs
security:
authorization: enabled
keyFile: /var/mongodb/pki/m103-keyfile
net:
bindIp: localhost,192.168.103.100
port: 26001
systemLog:
destination: file
path: /var/mongodb/db/csrs1.log
logAppend: true
processManagement:
fork: true
storage:
dbPath: /var/mongodb/db/csrs1

vagrant@m103:~/M103/Sharding$ cat csrs_2.conf
sharding:
clusterRole: configsvr
replication:
replSetName: m103-csrs
security:
authorization: enabled
keyFile: /var/mongodb/pki/m103-keyfile
net:
bindIp: localhost,192.168.103.100
port: 26002
systemLog:
destination: file
path: /var/mongodb/db/csrs2.log
logAppend: true
processManagement:
fork: true
storage:
dbPath: /var/mongodb/db/csrs2

vagrant@m103:~/M103/Sharding$ cat csrs_3.conf
sharding:
clusterRole: configsvr
replication:
replSetName: m103-csrs
security:
keyFile: /var/mongodb/pki/m103-keyfile
net:
bindIp: localhost,192.168.103.100
port: 26003
systemLog:
destination: file
path: /var/mongodb/db/csrs3.log
logAppend: true
processManagement:
fork: true
storage:
dbPath: /var/mongodb/db/csrs3
vagrant@m103:~/M103/Sharding$

It looks like you’ve seen this post, have you ticked off all the points?

1 Like

Closing this thread as the issue has been resolved.