Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Super Guru

Scenario: Lets say you have 2 ranger admin instances configured in your cluster. Now if you want to enable Ranger HA, you need to delete one of the ranger admin instance[since Ranger HA admin wizard will create 2nd instance of ranger for you]

In such case you need to remove one instance of Ranger admin which is already installed.

The following steps will guide you how to remove Ranger Admin instance using Ambari API

  1. Backup Ambari Server database [https://ambari.apache.org/current/installing-hadoop-using-ambari/content/ambari-chap11-1.html]
  2. Stop the Ranger service using Ambari. In case the Ranger Admin fails to stop, try stopping the Ranger Service as follows using Ambari API:
    curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo":{"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' \
    http://xxx.hostname:8080/api/v1/clusters/TEST/services/RANGER
    
    curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop Service"}, "Body": {"ServiceComponentInfo": {"state": "INSTALLED"}}}'  \
    http://xxx.hostname:8080/api/v1/clusters/TEST/hosts/xxx.hostname/host_components/RANGER_ADMIN
  3. Remove Ranger Admin using API:
    curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE  http://xxx.hostname:8080/api/v1/clusters/TEST/hosts/xxx.hostname/host_components/RANGER_ADMIN
    
464 Views