我正在尝试设置一个2节点的暴食服务器。我已经在这两个节点上安装了gluster服务器,并启动了glusterd服务。我可以从这两台机器中每一台来平平这些机器。之后,当我尝试执行命令时
sudo gluster peer probe gluster1这是我收到的错误
Error : Request timed out发布于 2022-03-30 10:24:19
因此,当我尝试在AWS中的3节点UbuntuT3-小型集群上配置gluster时,我遇到了同样的问题。
对我有用的是在aws中为节点打开TCP端口24007:24008和49152:49156。
在我的例子中,我们使用terraform来提供节点,这样aws_security_group就有了一个配置:
ingress {
from_port = 24007
to_port = 24008
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 49152
to_port = 49156
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 38465
to_port = 38467
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 111
to_port = 111
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 111
to_port = 111
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 2049
to_port = 2049
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}此外,我必须在本地公开在每个节点中运行这些命令的端口。
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 24007:24008 -j ACCEPT
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 49152:49156 -j ACCEPT
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 38465:38467 -j ACCEPT
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 111:111 -j ACCEPT
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 2049:2049 -j ACCEPT关于我是如何做到这一点的一些参考资料:
https://serverfault.com/questions/571386/firewall-iptables-rules-for-glusterfs https://docs.rackspace.com/support/how-to/allow-web-traffic-in-iptables/
希望这有帮助
发布于 2021-12-09 13:12:55
这件事解决了。gluster使用24007端口在存储卷的对等端之间进行通信。我必须指定防火墙规则来接受来自其他计算机的24007传入tcp请求。
发布于 2022-01-16 14:51:22
是的,你应该加上这条自由墙规则:
论Centos或red分布
firewall-cmd --add-service=glusterfs --permanent
success
firewall-cmd --reload对ubuntu来说:
ufw allow glusterfshttps://stackoverflow.com/questions/70288247
复制相似问题