Ambari刪除service 報錯

使用Ambari Api 進行刪除service 報錯數據庫

curl -s -u admin:admin -H "X-Requested-By: Ambari" -X DELETEapache

 http://***:8080/api/v1/clusters/cluster/services/MONGODBapi

錯誤curl

{url

  "status" : 500,spa

  "message" : "org.apache.ambari.server.controller.spi.SystemException: An internal system exception occurred: Cannot remove MONGODB. Desired state STARTED is not removable.  Service must be stopped or disabled."rest

}component

只能經過數據庫裏進行刪除,好比服務是MONGODB ,刪除腳本以下server

delete from servicedesiredstate where service_name like '%MONGODB%';rem

delete from hostcomponentstate where component_name like '%MONGODB%';

delete from hostcomponentdesiredstate where component_name like '%MONGODB%';

delete from servicecomponentdesiredstate where component_name like '%MONGODB%';

delete from clusterservices where service_name like 'MONGODB';


重啓服務

Ambari-server restart

相關文章
相關標籤/搜索