Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

I tried to stop Node manager through REST API, i got http 200 code, it is accepted and not excuting. Can anyone suggest what is wrong?

Expert Contributor

Here my command :

curl -u admin:Password -H "X-Requested-By:ambari" -i -X PUT -d '{"RequestInfo":{"context":"Stop NODEMANAGER"}, "Body":{"HostRoles":{"state":"INSTALLED"}}}' http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/NO...

Thank you in advance.

1 ACCEPTED SOLUTION

Expert Contributor

curl -u admin:password -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo":{"context":"Stop NODEMANAGER"}, "Body":{"HostRoles": {"state": "INSTALLED"}}}' http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/$hostname/host_components/NODEMANAGER

View solution in original post

4 REPLIES 4

@Ram D

Once accepted, did it start a job in the Ambari Ops? Please check for any errors in the Ambari Opts listing for this job. Also tail ambari-server.log for this period and observe if any error is reported related to this curl command.

Expert Contributor

It got worked for me with the following command :.

curl -u admin:password -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo":{"context":"Stop NODEMANAGER"}, "Body":{"HostRoles": {"state": "INSTALLED"}}}' http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/$hostname/host_components/NODEMANAGER

I dont know what is the difference between both commands?

Mentor

@Ram D keep your passwords safe

Expert Contributor

curl -u admin:password -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo":{"context":"Stop NODEMANAGER"}, "Body":{"HostRoles": {"state": "INSTALLED"}}}' http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/$hostname/host_components/NODEMANAGER

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.