擴展的問題之一: Hadoop: Connecting to ResourceManager failedHadoop的ResourceManager的HA連接到ResourceManager中的/0.0.0.0:8032
的Hadoop 2.6.1
我有ResourceManager的HA配置。
當我殺死'本地'ResourceManager(檢查集羣)時,發生故障切換,並且其他服務器上的ResourceManager變爲活動狀態。不幸的是,當我嘗試使用「本地」實例nodemanager運行作業時,它不會將請求「故障轉移」到活動的ResourceManager。
[email protected]:~$ jps
26738 Jps
23463 DataNode
23943 DFSZKFailoverController
24297 NodeManager
25690 ResourceManager
23710 JournalNode
23310 NameNode
#kill and start ResourceManager, so the failover occur
[email protected]:~$ kill -9 25690
~/hadoop/sbin/yarn-daemon.sh start resourcemanager
[email protected]:~$ ~/hadoop/bin/yarn rmadmin -getServiceState rm1
standby
[email protected]:~$ ~/hadoop/bin/yarn rmadmin -getServiceState rm2
active
#run my class:
14:56:51.476 [main] INFO o.apache.samza.job.yarn.ClientHelper - trying to connect to RM 0.0.0.0:8032
2015-10-29 14:56:51 RMProxy [INFO] Connecting to ResourceManager at /0.0.0.0:8032
14:56:51.572 [main] DEBUG o.a.h.s.a.util.KerberosName - Kerberos krb5 configuration not found, setting default realm to empty
2015-10-29 14:56:51 NativeCodeLoader [WARN] Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14:56:51.575 [main] DEBUG o.a.hadoop.util.PerformanceAdvisory - Falling back to shell based
2015-10-29 14:56:52 Client [INFO] Retrying connect to server: 0.0.0.0/0.0.0.0:8032. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2015-10-29 14:56:53 Client [INFO] Retrying connect to server: 0.0.0.0/0.0.0.0:8032. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
紗的site.xml
<property>
<name>yarn.resourcemanager.ha.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.resourcemanager.cluster-id</name>
<value>clusterstaging</value>
</property>
<property>
<name>yarn.resourcemanager.ha.rm-ids</name>
<value>rm1,rm2,rm3</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm1</name>
<value>stg-hadoop106</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm2</name>
<value>stg-hadoop107</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm3</name>
<value>stg-hadoop108</value>
</property>
<property>
<name>yarn.resourcemanager.zk-address</name>
<value>A:2181,B:2181,C:2181</value>
</property>
我沒有配置
<name>yarn.resourcemanager.hostname</name>
,因爲它應該工作 '是' - 糾正我,如果我錯了:)
我嘗試過
<name>yarn.client.failover-proxy-provider</name>
但沒有成功
任何想法? 也許我錯誤地期待客戶端找到活動的RM節點?
您知道如何在'自動故障切換'選項中切換節點主動/備用?
~/hadoop/bin/yarn rmadmin -failover rm1 rm2
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
~/hadoop/bin/yarn rmadmin -transitionToActive rm1 rm2
Automatic failover is enabled for [email protected]
Refusing to manually manage HA state, since it may cause