Hadoop Yarn集群中节点全是localhost

Hadoop集群部署后,出现Yarn的节点都是localhost,从而找不到其他的Node下发任务,出现如下的错误。

ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:10020. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

在Yarn Web UI中和yarn node -list查看,

022-09-30 11:48:54,735 INFO client.DefaultNoHARMFailoverProxyProvider: Connecting to ResourceManager at hadoop2/192.168.56.2:8032
Total Nodes:3
         Node-Id         Node-State Node-Http-Address   Number-of-Running-Containers
 localhost:42975            RUNNING    localhost:8042                              0
 localhost:41913            RUNNING    localhost:8042                              0
 localhost:36595            RUNNING    localhost:8042                              0

搜索到的解决方案是把/etc/hosts中的localhost项给注释掉,但是尝试后发现不能解决问题。

我的服务器系统是CentOS 8 Stream,最后的解决方案是直接改主机名。

  1. hostnamectl set-hostname hadoop1
  2. 修改/etc/hostname
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容