I installed Ranger and Ranger KMS on a cluster. Ranger started fine but Ranger KMS is failing to start, so i would like to remove it for now and install it later.
So I tried to remove it using the following command
FALBDCDQ0001V:~#curl -u admin:xxxxxx -H "X-Requested-By: ambari" -X DELETE http://localhost:8080/api/v1/clusters/hwtest/services/RANGER_KMS
but it failed to remove with the following exception
"status" : 500, "message" : "org.apache.ambari.server.controller.spi.SystemException: An internal system exception occurred: Cannot remove hwtest/RANGER_KMS. RANGER_KMS_SERVER is in a non-removable state."
I logged into the Ambari database to see if Ranger KMS is in a good state to remove. but the desired_state is showing as started eventhough it failed to start. So I updated the state using the following command and tried to remove the service again but i still got the same error as above.
update servicedesiredstate set desired_state='INSTALLED' where service_name='RANGER_KMS';
Here is the error when I try to restart Ranger KMS ..
2016-02-05 17:12:37,755 - Error : unknown url type: falbdcdq0001v.farmersinsurance.com Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py", line 82, in <module> KmsServer().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 216, in execute method(env) File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 484, in restart self.start(env) File "/var/lib/ambari-agent/cache/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py", line 55, in start enable_kms_plugin() File "/var/lib/ambari-agent/cache/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py", line 274, in enable_kms_plugin raise Fail('Ranger service is not started on given host') resource_management.core.exceptions.Fail: Ranger service is not started on given host
sorry if it is a dumb question but how do i remove those entries from Ambari? I dont see any option to delete.
@rbalam Sorry , I was on the road ..
curl --user admin:admin -i -H "X-Requested-By: ambari" -X DELETE http://`hostname -f`:8080/api/v1/clusters/CLUSTERNAME/services/RANGER_KMS
now search for KMS in filter under HDFS and you may see those entries that I shared in snapshot. Delete the entries by removing their values and save it ..Entries will go away by its own after save
I dont any option to remove this hadoop.security.key.provider.path. please see the attached image
I would recommend you to change the "desired_state" in the table "servicecomponentdesiredstate" under ambari database.
You can update the values where service_name = 'RANGER_KMS'.