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

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

Solved Go to solution
Highlighted

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

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

8 REPLIES 8
Highlighted

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

@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

Highlighted

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

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.

Highlighted

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

@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

Highlighted

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

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

Highlighted

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

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

Highlighted

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

Agree. Did you try running the previous command?

Highlighted

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

@Scott Shaw How did the delete process go?

Highlighted

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