我有一个3节点的hadoop集群(DigitalOcean小滴):
每当我运行mapreduce流作业,并且选择了一个工作节点来运行ApplicationMaster时,该作业将在尝试连接到ResourceManager时挂起。 datanode日志显示它尝试连接到0.0.0.0
conda install -n my_env jupyter
这是INFO [main] org.apache.hadoop.yarn.client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8030
INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 0 time(s);
INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 1 time(s);
的默认值。
但是我在两个工作节点的yarn-site.xml中都指定了此属性:
yarn.resourcemanager.hostname property
在我所有的节点上,我的/ etc / hosts文件如下所示,因此hadoop-master应该指向正确的IP地址。
<property>
<name>yarn.resourcemanager.hostname</name>
<value>hadoop-master</value>
</property>
我还通过访问hadoop-worker1:9864并访问worker节点的Web界面来查看配置,以查看加载的内容:
#127.0.1.1 hadoop-worker1 hadoop-worker1
127.0.0.1 localhost
# 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
#ff02::3 ip6-allhosts
165.22.19.161 hadoop-master
165.22.19.154 hadoop-worker1
165.22.19.158 hadoop-worker2
甚至,我尝试从其中一个workernode运行YARN命令,它实际上可以正确地与ResourceManager联系:
<property>
<name>yarn.resourcemanager.hostname</name>
<value>hadoop-master</value>
<final>false</final>
<source>yarn-site.xml</source>
</property>
我不确定该怎么办,我相信这可能与流作业无法正确加载设置有关,由于我在此问题上停留了2天,因此将不胜感激。
答案 0 :(得分:0)
我已将-D yarn.resourcemanager.hostname=hadoop-master
标志添加到mapred流命令中,并且现在似乎可以正常工作。