Support Questions

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

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?

avatar
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

avatar
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

avatar

@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.

avatar
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?

avatar
Master Mentor

@Ram D keep your passwords safe

avatar
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