我正在尝试部署MongoDB副本集。我已经将MongoDB实例作为First Digitalocen Droplet中副本的主要对象。现在,我正在尝试添加另一个在Second Digitalocen Droplet上托管的MongoDB实例,作为副本的辅助实例。我还在防火墙(ufw)中打开了27017端口,并允许IP地址27017 ALLOW Anywhere 27017 ALLOW 206.189.168.245
但是出现以下错误:
rs0:PRIMARY> rs.add('206.189.168.245:27017')
{
"ok" : 0,
"errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: 159.89.150.245:27017; the following nodes did not respond affirmatively: 206.189.168.245:27017 failed with Couldn't get a connection within the time limit",
"code" : 74,
"codeName" : "NodeNotFound"
}
在这里,Digitalocean的Droplet版本:Ubuntu 16.04.4 x64和MongoDB版本:v3.4.16
这是什么原因?
答案 0 :(得分:0)
尝试禁用 SELinux 和防火墙。
要检查SELinux和防火墙状态:
它将起作用...