- Stop YARN and Zookeeper services from ambari
- From Ambari-server :
/var/lib/ambari-server/resources/scripts/configs.py --user=admin --
password=admin --host=edgenode.hdp.cn --cluster=hdpdev --
action=get --config- type=yarn-site -f yarn-site.json
password=admin --host=edgenode.hdp.cn --cluster=hdpdev --
action=get --config- type=yarn-site -f yarn-site.json
- From the below change the first property to value "false" and remove the other properties from yarn-site.json
a) "yarn.resourcemanager.ha.enabled": "false",
b) "yarn.resourcemanager.ha.rm-ids": "rm1,rm2",
c) "yarn.resourcemanager.hostname.rm1": "datanode1.hdp.cn",
d) "yarn.resourcemanager.hostname.rm2": "edgenode.hdp.cn",
e) "yarn.resourcemanager.webapp.address.rm1": "datanode1.hdp.cn:8088",
f) "yarn.resourcemanager.webapp.address.rm2": "edgenode.hdp.cn:8088",
g) "yarn.resourcemanager.webapp.https.address.rm1": "datanode1.hdp.cn:8090",
h) "yarn.resourcemanager.webapp.https.address.rm2": "edgenode.hdp.cn:8090",
i) "yarn.resourcemanager.cluster-id": "yarn-cluster",
j) "yarn.resourcemanager.ha.automatic-failover.zk-base-path": "/yarn-leader-election",
- Set the below properties to existing resource manager
a) "yarn.resourcemanager.hostname":
b) "yarn.resourcemanager.admin.address":
c) "yarn.resourcemanager.webapp.address":
d)"yarn.resourcemanager.resource-tracker.address":
e)"yarn.resourcemanager.scheduler.address":
f)"yarn.resourcemanager.webapp.https.address":
g)"yarn.timeline-service.webapp.address":
h)"yarn.timeline-service.webapp.https.address":
i)"yarn.timeline-service.address":
j)"yarn.log.server.url":
- Copy the yarn-site.json file back to the ambari-server and run the below command to set the changes made
/var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin -- host=edgenode.hdp.cn --cluster=hdpdev --action=get --config-type=yarn-site
- Delete the Resource Manager host comonent
curl --user admin:admin -i -H "X-Requested-By: ambari" -X DELETE
http://edgenode.hdp.cn:8080/api/v1/clusters/hdpdev/hosts/edgenode.hdp.cn/
host_components/RESOURCEMANAGER
http://edgenode.hdp.cn:8080/api/v1/clusters/hdpdev/hosts/edgenode.hdp.cn/
host_components/RESOURCEMANAGER
- Start zookeeper service from Ambari.
- On zookeeper clients run the below command to change the znode permissions
/usr/hdp/current/zookeeper-client/bin/zkCli.sh getAcl /rmstore/ZKRMStateRoot
/usr/hdp/current/zookeeper-client/bin/zkCli.sh setAcl /rmstore/ZKRMStateRoot world:anyone:rwcda
- From Ambari UI, restart zookeeper service and YARN service