我安装了Hadoop 2.9.0。我检查了从节点中的 jps,正在运行datanode
并且nodemanager
在从节点namenode
和resourcemanager
主节点中。请帮忙看看为什么会出现这个错误?根据提出的解决方案,我禁用firewall
了SELinux
和IPv6
。问题是Live nodes
在 web UI 中是 0。
/etc/hosts:
1 localhost
127.0.1.1 hadoopmaster
#The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.111.154 hadoopmaster
192.168.111... hadoopslave1
192.168.111... hadoopslave2
192.168.111... hadoopslave3
所有节点中的配置:
核心站点.xml:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoopmaster:9000</value>
</property>
</configuration>
纱线站点.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.resource-tracker.address</name>
<value>hadoopmaster:8025</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>hadoopmaster:8030</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>hadoopmaster:8050</value>
</property>
</configuration>
输出netstat -nap | grep 9000
:
tcp 0 0 127.0.1.1:9000 0.0.0.0:* LISTEN 18205/java
tcp 0 0 127.0.0.1:59048 127.0.1.1:9000 TIME_WAIT -
我重新启动了hadoop并再次格式化了namenode,但我仍然收到此错误:(hadoop-hadoop-datanode-hadoopslave1.log)
2018-06-11 02:42:33,593 INFO org.apache.hadoop.ipc.Client:重试连接到服务器:hadoopmaster/192.168.111.154:9000。已尝试 4 次;重试策略是 RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)