hadoop 无法访问hdfs(50070,8088)的web界面

启动集群成功后,

[root@localhost hadoop-2.7.2]# sbin/yarn-daemon.sh start resourcemanager
starting resourcemanager, logging to /opt/hadoop/module/hadoop-2.7.2/logs/yarn-MissZhou-resourcemanager-localhost.localdomain.out
[root@localhost hadoop-2.7.2]# sbin/yarn-daemon.sh start nodemanager
starting nodemanager, logging to /opt/hadoop/module/hadoop-2.7.2/logs/yarn-MissZhou-nodemanager-localhost.localdomain.out
[root@localhost hadoop-2.7.2]# jps
7746 NameNode
8294 NodeManager
8056 ResourceManager
8393 Jps
7871 DataNode

无法访问:
hadoop 无法访问hdfs(50070,8088)的web界面_第1张图片
排除问题:

[root@localhost hadoop-2.7.2]# netstat -tpnl | grep java 

tcp        0      0 192.168.219.7:9000      0.0.0.0:*               LISTEN      7746/java           
tcp        0      0 0.0.0.0:50070           0.0.0.0:*               LISTEN      7746/java           
tcp        0      0 0.0.0.0:50010           0.0.0.0:*               LISTEN      7871/java           
tcp        0      0 0.0.0.0:50075           0.0.0.0:*               LISTEN      7871/java           
tcp        0      0 127.0.0.1:36321         0.0.0.0:*               LISTEN      7871/java           
tcp        0      0 0.0.0.0:50020           0.0.0.0:*               LISTEN      7871/java           
tcp6       0      0 :::8040                 :::*                    LISTEN      8294/java           
tcp6       0      0 :::8042                 :::*                    LISTEN      8294/java           
tcp6       0      0 192.168.219.7:8088      :::*                    LISTEN      8056/java           
tcp6       0      0 :::13562                :::*                    LISTEN      8294/java           
tcp6       0      0 192.168.219.7:8030      :::*                    LISTEN      8056/java           
tcp6       0      0 192.168.219.7:8031      :::*                    LISTEN      8056/java           
tcp6       0      0 192.168.219.7:8032      :::*                    LISTEN      8056/java           
tcp6       0      0 192.168.219.7:8033      :::*                    LISTEN      8056/java           
tcp6       0      0 :::36516                :::*                    LISTEN      8294/java    

解决问题:
加上这么一行-I INPUT -m state --state NEW -m tcp -p tcp --dport 50070 -j ACCEPT(再加一行8088)

[root@localhost hadoop-2.7.2]# sudo vi /etc/sysconfig/iptables
[root@localhost hadoop-2.7.2]# 

-A INPUT -p tcp -m state --state NEW -m tcp --dport 8088 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 50070 -j ACCEPT

hadoop 无法访问hdfs(50070,8088)的web界面_第2张图片

重启防火墙服务:
[root@localhost sbin]# systemctl restart iptables.service
再次访问:

主机ip地址+8088
hadoop 无法访问hdfs(50070,8088)的web界面_第3张图片
主机ip地址+50070
hadoop 无法访问hdfs(50070,8088)的web界面_第4张图片

你可能感兴趣的:(bug问题库【初学】)