我已经GlusterFS 3.2.6
在 上运行的几台服务器上安装了CentOS 6.2
。我没有可用的主机名,因为这是一个测试设置,所以我刚刚将服务器的 IP 添加到文件中/etc/hosts
。问题是我无法创建存储池,因为 DNS 错误:
[root@san ~]# gluster peer status
Number of Peers: 1
Hostname: example.com
State: Establishing Connection (Disconnected)
[root@san glusterfs]# tail -f /var/log/glusterfs/etc-glusterfs-glusterd.vol.log
[2012-04-05 16:21:08] I [glusterd-handler.c:623:glusterd_handle_cli_probe] 0-glusterd: Received CLI probe req example.com 24007
[2012-04-05 16:21:08] I [glusterd-handler.c:391:glusterd_friend_find] 0-glusterd: Unable to find hostname: example.com
[2012-04-05 16:21:08] I [glusterd-handler.c:3427:glusterd_probe_begin] 0-glusterd: Unable to find peerinfo for host: example.com (24007)
[2012-04-05 16:21:08] I [glusterd-handler.c:3409:glusterd_friend_add] 0-glusterd: connect returned 0
[2012-04-05 16:21:08] E [socket.c:1685:socket_connect_finish] 0-management: connection to failed (No route to host)
[root@san glusterfs]# grep dns /etc/nsswitch.conf
hosts: files dns
[root@san glusterfs]# cat /etc/hosts
# It's not a real IP
192.168.0.1 example.com
[root@san glusterfs]# cat /etc/glusterfs/glusterd.vol
volume management
type mgmt/glusterd
option working-directory /etc/glusterd
option transport-type socket,rdma
option transport.socket.keepalive-time 10
option transport.socket.keepalive-interval 2
end-volume
我也尝试过直接使用 IP 地址连接以避免任何 DNS 查找,但仍然无法连接。您能帮我解决这个问题吗?谢谢。
答案1
也许这不是 DNS 的问题。你确定你想要对等的主机上的 iptables 配置正确了吗?尝试关闭主机上的防火墙,检查是否存在问题(我遇到了同样的问题,结果发现是防火墙的问题)