Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to refresh services after server deleted

avatar

after we delete service by AP as example

curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE  http://<IP>:8080/api/v1/clusters/<cluster name>/services/<service name>

the service deleted from ambari hosts but not from ambari services

in order to refresh ambari we restart the ambari-server and after that the service not apears under services

the problem is that ambari-server restart is too aggressive and we want to refresh the amabri GUI ( services )

so how to refresh the ambari GUI ? ( by API or other CLI command ) ?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Bronson

When we delete a service from ambari via Ambari UI then immediately after service deletion the Ambari UI reloads the page and then you won't see the deleted services in the ambari UI on the left panel.

However when we delete services via ambari API then it does not involve the Ambari UI invocation rather it simply invokes the back end APIs that are responsible for deleting the Service details from the ambari DB directly and hence the ambari UI will still show the Deleted Service present there.

.

So after deleting the service using ambari APIs you will need to refresh the ambari UI (a hard browser refresh), which will make the ambari UI to reload the service list and then you should not see the deleted service there.

Sometimes it also happens that some browsers (like Internet Explorer does a caching of the browser contents) caches the UI data so in that you might have to either disable the browser cache or doa hard refresh of the browser or reopen the browser after clearing the ambari UI cache from browser.

You do not need to restart the ambari server, rather you will need to just refresh the browser or clear the browser cache and reopen it.

.

Unfortunately it is not possible to refresh the Ambari UI using the Rest API calls (or using any CLI calls).

View solution in original post

1 REPLY 1

avatar
Master Mentor

@Michael Bronson

When we delete a service from ambari via Ambari UI then immediately after service deletion the Ambari UI reloads the page and then you won't see the deleted services in the ambari UI on the left panel.

However when we delete services via ambari API then it does not involve the Ambari UI invocation rather it simply invokes the back end APIs that are responsible for deleting the Service details from the ambari DB directly and hence the ambari UI will still show the Deleted Service present there.

.

So after deleting the service using ambari APIs you will need to refresh the ambari UI (a hard browser refresh), which will make the ambari UI to reload the service list and then you should not see the deleted service there.

Sometimes it also happens that some browsers (like Internet Explorer does a caching of the browser contents) caches the UI data so in that you might have to either disable the browser cache or doa hard refresh of the browser or reopen the browser after clearing the ambari UI cache from browser.

You do not need to restart the ambari server, rather you will need to just refresh the browser or clear the browser cache and reopen it.

.

Unfortunately it is not possible to refresh the Ambari UI using the Rest API calls (or using any CLI calls).