我设置了一个带有两个节点hadoop01(master-10.0.0.151)和hadoop02(slave-10.0.0.152)的hadoop集群
当一个类型start-dfs.sh然后访问网站
my_ip(上面只有10.0.0.151):50070。它很成功。
但是当我输入start-yarn.sh然后访问网站my_ip:8088。它失败了。
my yarn-site.xml:
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>hadoop01:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>hadoop01:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>hadoop01:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>hadoop01:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>hadoop01:8088</value>
</property>
核心-site.xml中:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop01:8020</value>
</property>
</configuration>
与hadoop02(奴隶)相同的设置
我的hadoop01 hadoop-2.2.0 / etc / hadoop / slaves set
hadoop01
hadoop02
输入start-dfs.sh&amp; start-yarn.sh然后我输入jps
hadoop01:
21594 NameNode
22345 NodeManager
22007 SecondaryNameNode
22171 ResourceManager
23147 Jps
21762 DataNode
hadoop02:
29861 NodeManager
30358 Jps
29665 DataNode
myoop01中的/ etc / hosts:
localhost hadoop01
10.0.0.151 hadoop01
10.0.0.152 hadoop02
myoop02中的/ etc / hosts:
localhost hadoop02
10.0.0.151 hadoop01
10.0.0.152 hadoop02
这个轰鸣声链接是我上传到google dirve的yarn-nodemanager.log https://drive.google.com/file/d/0B7nCJ_XJWSrQN1BZVTVyOEgxd1E/edit?usp=sharing 但是如果我没有遗漏某些信息,yarn-nodemanager.log就不会出现错误..
请帮助我改善无法访问网站http://10.0.0.151:8088
**如果需要其他信息(如hdfs-site.xml等),请告诉我。我会更新..
netstat -tunalp | grep LISTEN
tcp 0 0 0.0.0.0:50010 0.0.0.0:* LISTEN 17442/java
tcp 0 0 0.0.0.0:50075 0.0.0.0:* LISTEN 17442/java
tcp 0 0 0.0.0.0:50020 0.0.0.0:* LISTEN 17442/java
tcp 0 0 0.0.0.0:50090 0.0.0.0:* LISTEN 17693/java
tcp 0 0 10.0.0.151:8020 0.0.0.0:* LISTEN 17267/java
tcp 0 0 0.0.0.0:50070 0.0.0.0:* LISTEN 17267/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::13562 :::* LISTEN 21061/java
tcp6 0 0 10.0.0.151:8030 :::* LISTEN 20881/java
tcp6 0 0 10.0.0.151:8031 :::* LISTEN 20881/java
tcp6 0 0 10.0.0.151:8032 :::* LISTEN 20881/java
tcp6 0 0 10.0.0.151:8033 :::* LISTEN 20881/java
tcp6 0 0 :::33762 :::* LISTEN 21061/java
tcp6 0 0 :::8040 :::* LISTEN 21061/java
tcp6 0 0 :::8042 :::* LISTEN 21061/java
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 10.0.0.151:8088 :::* LISTEN 20881/java
禁用ipv6后,我输入netstat -tunalp | grep LISTEN
tcp 0 0 0.0.0.0:13562 0.0.0.0:* LISTEN 30608/java
tcp 0 0 0.0.0.0:50010 0.0.0.0:* LISTEN 29967/java
tcp 0 0 0.0.0.0:50075 0.0.0.0:* LISTEN 29967/java
tcp 0 0 10.0.0.151:8030 0.0.0.0:* LISTEN 30424/java
tcp 0 0 10.0.0.151:8031 0.0.0.0:* LISTEN 30424/java
tcp 0 0 0.0.0.0:52992 0.0.0.0:* LISTEN 30608/java
tcp 0 0 10.0.0.151:8032 0.0.0.0:* LISTEN 30424/java
tcp 0 0 10.0.0.151:8033 0.0.0.0:* LISTEN 30424/java
tcp 0 0 0.0.0.0:50020 0.0.0.0:* LISTEN 29967/java
tcp 0 0 0.0.0.0:8040 0.0.0.0:* LISTEN 30608/java
tcp 0 0 0.0.0.0:8042 0.0.0.0:* LISTEN 30608/java
tcp 0 0 0.0.0.0:50090 0.0.0.0:* LISTEN 30222/java
tcp 0 0 10.0.0.151:8020 0.0.0.0:* LISTEN 29790/java
tcp 0 0 0.0.0.0:50070 0.0.0.0:* LISTEN 29790/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 10.0.0.151:8088 0.0.0.0:* LISTEN 30424/java
tcp6 0 0 :::22 :::* LISTEN -
答案 0 :(得分:5)
这里的问题是资源管理器正在运行,但资源管理器占用的端口( 8030,8031,8032,8033,8088 )使用tcp6而不是tcp(参见左侧部分)。你有两个选择,你可以在linux系统中禁用ipv6然后重启yarn服务。
或
尝试仅在主节点上修改yarn-site.xml,如下所示。不要修改从属节点中的yarn-site.xml:
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<configuration>
指定hostname会导致端口以tcp6启动,即使没有指定这些端口也会采用默认值。看看以下默认端口
http://hadoop.apache.org/docs/r2.2.0/hadoop-yarn/hadoop-yarn-common/yarn-default.xml
在修改yarn-site.xml后重启你的纱线服务
答案 1 :(得分:1)
对我而言Hadoop: binding multiple IP addresses to a cluster NameNode:
在hdfs-site.xml中,将dfs.namenode.rpc-bind-host的值设置为 0.0.0.0和Hadoop将监听私有和公共网络接口,允许远程访问和数据节点访问。
并在防火墙设置中打开8088。
答案 2 :(得分:0)
这与https://issues.apache.org/jira/browse/HADOOP-605有关; Hadoop配置脚本添加了-Djava.net.preferIPv4Stack=true
标志以强制IPv4绑定,但Yarn配置脚本中缺少此标志。你可以通过在bin / yarn(在exec之前)的末尾添加来解决这个问题:
YARN_OPTS =“$ YARN_OPTS -Djava.net.preferIPv4Stack = true”