spark Yarn模式运行报错:Connecting to ResourceManager at /0.0.0.0:8032

1、报错信息如下

11 20:11:07,922 INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2014-05-11 20:11:09,966 INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2014-05-11 20:11:11,994 INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2014-05-11 20:11:14,022 INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2014-05-11 20:11:16,065 INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2014-05-11 20:11:18,093 INFO [main] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)

1、首先关闭防火墙

最终发现把防火墙关了就好了!!!

1:查看防火状态

systemctl status firewalld

service  iptables status

2:暂时关闭防火墙

systemctl stop firewalld

service  iptables stop

3:永久关闭防火墙

systemctl disable firewalld

chkconfig iptables off

4:重启防火墙

systemctl enable firewalld

service iptables restart  

5:永久关闭后重启

//暂时还没有试过

chkconfig iptables on

2、修改yarn-site.xml

<property>
        <name>yarn.resourcemanager.addressname>
        <value>hadoop103:8032value>
      property>
      <property>
        <name>yarn.resourcemanager.scheduler.addressname>
        <value>hadoop103:8030value>
      property>
      <property>
        <name>yarn.resourcemanager.resource-tracker.addressname>
        <value>hadoop103:8031value>
   property>

** 要注意代码中节点要对应yarn所在主机节点,我这里是hadoop103**


<property>
        <name>yarn.resourcemanager.hostnamename>
        <value>hadoop103value>
property>

修改完之后,不在报错,yarn服务找到,如下图所示
spark Yarn模式运行报错:Connecting to ResourceManager at /0.0.0.0:8032_第1张图片
spark Yarn模式运行报错:Connecting to ResourceManager at /0.0.0.0:8032_第2张图片

你可能感兴趣的:(Hadoop/Spark)