Support Questions
Find answers, ask questions, and share your expertise

Ambari 2 + Could have added the Remove the service from WI

Ambari 2 + Could have added the Remove the service from WI

Expert Contributor

While Adding HDFS service,

1)even there is an package dependent r while adding the services HDFS

2) I clicked next , next ....finally completed with error.

However i am struggling the removing the HDFS server, is any other way to remove HDFS from ambari

3 REPLIES 3

Re: Ambari 2 + Could have added the Remove the service from WI

Expert Contributor

Is any other way to Delete only HDFS Service only and reinstall again ?

Re: Ambari 2 + Could have added the Remove the service from WI

Expert Contributor

We can Delete the Services from Ambari server, which installed using Ambari WI steps need to follow as below.

1) Login in root user and run below command to remove the servicem which would like to remove, my case HDFS service

Example :-

#curl -s -u admin:admin -H “X-Requested-By: Ambari” -X DELETE http://AMBARI-HOST:8080/api/v1/clusters/CLUSTER_NAME/services/SERVICE_NAME

[root@centos hadoop]# curl -u admin:admin -X DELETE -H "X-Requested-By: ambari" http://centos:8080/api/v1/clusters/Hadoop/services/HDFS

After removing, it given error as below, when i ran again.

[root@centos hadoop]# curl -u admin:admin -X DELETE -H "X-Requested-By: ambari" http://centos:8080/api/v1/clusters/Hadoop/services/HDFS { "status" : 404, "message" : "org.apache.ambari.server.controller.spi.NoSuchResourceException: The specified resource doesn't exist: Service not found, clusterName=Hadoop, serviceName=HDFS" }

2) Once removed, need to restart the ambari-server from ambari server

[root@centos hadoop]# ambari-server restart

Using python /usr/bin/python2.6 Restarting ambari-server

Using python /usr/bin/python2.6

Stopping ambari-server Ambari Server s

topped Using python /usr/bin/python2.6

Starting ambari-server Ambari Server running with administrator privileges.

Organizing resource files at /var/lib/ambari-server/resources...

Server PID at: /var/run/ambari-server/ambari-server.pid

Server out at: /var/log/ambari-server/ambari-server.out

Server log at: /var/log/ambari-server/ambari-server.log

Waiting for server start.................... Ambari Server 'start' completed successfully.

6772-ap5pa.png

After removing the HDFS service.

6773-ml7ks.png

Re: Ambari 2 + Could have added the Remove the service from WI

Expert Contributor

On Which Version we can able to remove the services from Ambari WI ?