Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 12-29-2015 08:55 AM - edited 09-16-2022 02:55 AM
Step 1. vi /etc/hadoop/conf/yarn-site.xml
Add Follow line
<property> <name>yarn.resourcemanager.ha.id</name>
<value>rm1</value>
<description>If we want to launch more than one RM in single node, we need this configuration</description> </property>
<property>
<name>yarn.resourcemanager.ha.id</name>
<value>rm2</value>
<description>If we want to launch more than one RM in single node, we need this configuration</description>
</property>
<!-- RM1 Configs -->
<property>
<name>yarn.resourcemanager.address.rm1</name>
<value>sandbox.hortonworks.com:23140</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address.rm1</name>
<value>sandbox.hortonworks.com:23130</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address.rm1</name>
<value>sandbox.hortonworks.com:23188</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address.rm1</name>
<value>sandbox.hortonworks.com:23125</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address.rm1</name>
<value>sandbox.hortonworks.com:23141</value>
</property>
<!-- RM2 configs -->
<property>
<name>yarn.resourcemanager.address.rm2</name>
<value>sandbox.hortonworks.com:33140</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address.rm2</name>
<value>sandbox.hortonworks.com:33130</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address.rm2</name>
<value>sandbox.hortonworks.com:33188</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address.rm2</name>
<value>sandbox.hortonworks.com:33125</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address.rm2</name>
<value>sandbox.hortonworks.com:33141</value>
</property>
<property>
<name>yarn.resourcemanager.ha.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.resourcemanager.ha.rm-ids</name>
<value>rm1,rm2</value>
</property>
<property>
<name>yarn.resourcemanager.recovery.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.resourcemanager.store.class</name> <value>org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore</value>
</property>
<property>
<name>yarn.resourcemanager.zk-address</name>
<value>sandbox.hortonworks.com:2181</value>
<description>For multiple zk services, separate them with comma</description>
</property>
<property>
<name>yarn.resourcemanager.cluster-id</name>
<value>yarn-cluster</value>
</property>
<property>
<name>yarn.resourcemanager.ha.automatic-failover.zk-base-path</name>
<value>/yarn-leader-election</value>
<description>Optional setting. The default value is /yarn-leader-election</description>
</property>
<property>
<name>yarn.resourcemanager.cluster-id</name>
<value>yarn-cluster</value>
</property>
<property>
<name>yarn.resourcemanager.zk-state-store.address</name>
<value>sandbox.hortonworks.com:2181</value>
</property>
Manual Start ZooKeeper.Start hdfs Start yarn .. .
[yarn@sandbox ~]$ yarn rmadmin -getServiceState rm1 15/12/29 08:43:30 INFO ipc.Client: Retrying connect to server: sandbox.hortonworks.com/192.168.182.145:23141. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=1, sleepTime=1000 MILLISECONDS) Operation failed: Call From sandbox.hortonworks.com/192.168.182.145 to sandbox.hortonworks.com:23141 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
[yarn@sandbox ~]$ yarn rmadmin -getServiceState rm2
standby
Created 12-29-2015 10:32 AM
You can't have High Availability for any service i.e. Resource Manager in your case, in a single machine sandbox environment.
Created 12-29-2015 09:54 AM
Configuring HA on single node is not expected thing to do.
Created 12-29-2015 10:32 AM
You can't have High Availability for any service i.e. Resource Manager in your case, in a single machine sandbox environment.