gpt4 book ai didi

Hadoop yarn 节点列表显示奴隶作为 localhost.localdomain :#somenumber. 连接拒绝异常

转载 作者:可可西里 更新时间:2023-11-01 14:21:07 25 4
gpt4 key购买 nike

我在尝试运行 wordcount 程序时遇到从 localhost.localdomain/127.0.0.1 到 localhost.localdomain:55352 的连接拒绝异常。 yarn 节点列表给出

hduser@localhost:/usr/local/hadoop/etc/hadoop$ yarn node -list
15/05/27 07:23:54 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.111.72:8040
Total Nodes:2
Node-Id Node-State Node-Http-Address Number-of-Running-Containers
localhost.localdomain:32991 RUNNING localhost.localdomain:8042 0
localhost.localdomain:55352 RUNNING localhost.localdomain:8042 0

master/etc/hosts:

127.0.0.1    localhost localhost.localdomain localhost4 localhost4.localdomain4
#127.0.1.1 ubuntu-Standard-PC-i440FX-PIIX-1996
192.168.111.72 master
192.168.111.65 slave1
192.168.111.66 slave2

# 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

从/etc/hosts:

127.0.0.1       localhost.localdomain localhost
#127.0.1.1 ubuntu-Standard-PC-i440FX-PIIX-1996
192.168.111.72 master
#192.168.111.65 slave1
#192.168.111.66 slave2

# 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

我的理解是主人错误地尝试连接到本地主机上的奴隶。请帮我解决这个问题。任何建议表示赞赏。谢谢你。

最佳答案

HereNodeManager 如何构建 NodeId 的代码:

private NodeId buildNodeId(InetSocketAddress connectAddress,
String hostOverride) {
if (hostOverride != null) {
connectAddress = NetUtils.getConnectAddress(
new InetSocketAddress(hostOverride, connectAddress.getPort()));
}
return NodeId.newInstance(
connectAddress.getAddress().getCanonicalHostName(),
connectAddress.getPort());
}

NodeManager 尝试从绑定(bind)地址获取规范主机名,localhost 将通过给定地址 127.0.0.1 获取。

因此在您的情况下,在从属主机上,localhost.localdomain 是地址 127.0.0.1 的默认主机名,可能的解决方案可能是更改第一个/etc/hosts 在你的 slaves 上的行分别到:

  127.0.0.1  slave1 localhost.localdomain localhost

  127.0.0.1  slave2 localhost.localdomain localhost

关于Hadoop yarn 节点列表显示奴隶作为 localhost.localdomain :#somenumber. 连接拒绝异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30468637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com