连接ResourceManager 失败

现象

spark-submit on yarn 时出现异常。

22/07/20 15:59:52 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
22/07/20 15:59:53 INFO client.RMProxy: Connecting to ResourceManager at sh01/172.16.99.215:8010
22/07/20 15:59:54 INFO ipc.Client: Retrying connect to server: sh01/172.17.99.215:8010. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
22/07/20 15:59:55 INFO ipc.Client: Retrying connect to server: sh01/172.17.99.215:8010. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
22/07/20 15:59:56 INFO ipc.Client: Retrying connect to server: sh01/172.17.99.215:8010. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

根据日志是链接 ResourceManager 时一直在尝试… 也是就说客户端连不上 yarn。


问题查找

  1. 确认平台上 yarn 是不是已经启动了,(我遇到的就是 yarn 没有启动)

    jps
    
    8144 SecondaryNameNode
    9251 Master
    7732 NameNode
    3215205 Jps
    3214887 ResourceManager #(能看到这个表示 yarn 启动了)
    2748510 Master
    
  2. 看下 yarn-site.xml 中是否配置正确。

     <property>
       <name>yarn.resourcemanager.address</name>
       <value>sh01:8010</value>
     </property>
    
  3. 可能是解析不了自定与域名,在/etc/hosts 要配置域名映射。

    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    172.17.99.215 sh01
    
  4. 确认hadoop环境变量是否配置正确。

    echo ${HADOOP_HOME}
    /usr/local/hadoop
    
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值