因为hadoop用的端口太多了, 原因:centos默认防火墙开放ssh但不开放8088端口,ssh登录正常, vi /etc/sysconfig/iptables # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,。
1. 在master:192.168.6.121上执行 netstat -na 可以看到192.168.6.121:8088 2. 在slave1: 192.168.6.150上执行 wget :8088 正在连接 192.168.6.121:8088... 失败:没有到主机的路由 master与slave1之间能相互ping通,神途sf,一个个过滤实在麻烦 ,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8088 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 11211 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT 最后重启防火墙使配置生效 /etc/init.d/iptables restart 查看打开的端口: # /etc/init.d/iptables status 关闭防火墙: /etc/init.d/iptables stop 建议关掉iptables。