Support Questions

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

How do you remove SmartSense when in a pending install state?

avatar

SmartSense install failed and is stuck in a "pending" state. We want to remove it from Ambari and retry the install.

1 ACCEPTED SOLUTION

avatar
8 REPLIES 8

avatar
Master Mentor

@Scott Shaw

Uninstall SmartSense from Ambari

To remove the SmartSense service and view, follow the steps below.

  1. First make sure all of the SmartSense services are stopped from the Ambari UI. (Optionally you can run below command). Please ensure that all the SmartSense services are completely stopped before continuing. If they are not stopped, the uninstallation process will not be successful, and the service will not be able to be removed.

    curl ­u admin:$PASSWORD­i ­H 'X­Requested­By: ambari' ­X PUT ­d '{"RequestInfo": {"context" :"Stop SmartSense via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services/SMA RTSENSE

  2. Uninstall all SmartSense components

    curl ­u admin:$PASSWORD­i ­H 'X­Requested­By: ambari' ­X POST ­d '{"RequestInfo": {"context" :"Uninstall SmartSense via REST", "command":"Uninstall"}, "Requests/resource_filters":[{"hosts":"comma separated host names", "service_name":"SMARTSENSE", "component_name":"HST_AGENT"}]}' http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/requests

    NOTE:After issuing this command wait for Ambari operations to successfully complete. You can check this through Ambari UI . Make sure that there are

    no operations in progress.

  3. Run the following command to remove SmartSense service from Ambari

    curl ­u admin:$PASSWORD­H 'X­Requested­By: ambari' ­X DELETE http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services/SMA RTSENSE

  4. Restart ambari server for all changes to take effect

    # ambari­server restart

avatar

The curl command is written for an "installed" state. Do you know what ServiceInfo state is for a pending install? I tried "PENDING" and that's not a valid value.

avatar
Master Mentor

@Scott Shaw

Please try this.

curl --user admin:admin -i -H "X-Requested-By: ambari" -X DELETE http://`hostname -f`:8080/api/v1/clusters/<cluster name>/services/SMARTSENSE

avatar
Master Mentor

@Paul Codding Could you please take a look on this?

avatar

Documentation states explicitly that service will not be able to removed if you try to delete the service in a non-stopped state.

avatar
Master Mentor

Agree. Did you try running the previous command?

avatar
Master Mentor

@Scott Shaw How did the delete process go?

avatar