<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: amari rest API + how to stop service on specific host in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290663#M215006</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error says :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;hostname=kafka01. Host not found&lt;/LI-CODE&gt;&lt;P&gt;So please check if the Hostname is correct (i means fully qualified hostnmae)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please compare it with the hostname listed in the following API call response. Just try to open this URL in the browser to see which hostname ambari is expecting:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;http://ambari_server_hostname:8080/api/v1/clusters/$CLUSTER_NAME/hosts/&lt;/LI-CODE&gt;&lt;P&gt;.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2020 00:34:29 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2020-02-28T00:34:29Z</dc:date>
    <item>
      <title>amari rest API + how to stop service on specific host</title>
      <link>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290651#M215000</link>
      <description>&lt;P&gt;&lt;STRONG&gt;hi all&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;in ambari we have kafka service , and this service include 7 kafka brokers&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;how to stop/start the kafka broker on specific host?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;in this example kafka service contain&amp;nbsp;the following&amp;nbsp;kafka broker&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;hosts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;kafka01&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;kafka02&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;kafka03&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;kafka04&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;kafka05&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;kafka06&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;kafka07&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;other repleted post -&amp;nbsp;&lt;A href="https://community.cloudera.com/t5/Support-Questions/how-to-identify-alert-from-kafka-service-in-ambari-by-REST/m-p/284675#M211372" target="_blank" rel="noopener"&gt;https://community.cloudera.com/t5/Support-Questions/how-to-identify-alert-from-kafka-service-in-ambari-by-REST/m-p/284675#M211372&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 691px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26524i42F570183724A749/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 23:55:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290651#M215000</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2020-02-27T23:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: amari rest API + how to stop service on specific host</title>
      <link>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290660#M215003</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Using API call &lt;EM&gt;&lt;STRONG&gt;Get the List of Hostnames where KAFKA_BROKERS are&lt;/STRONG&gt;&lt;/EM&gt; running:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# curl -iskH "X-Requested-By: ambari" -X GET -u admin:admin ttp://testnode1.example.com:8080/api/v1/clusters/NewCluster/services/KAFKA/components/KAFKA_BROKER?fields=host_components/HostRoles/hostname | grep host_name | awk -F ":" '{print $2}' | sed -e 's|["'\'']||g'

 testnode2.example.com
 testnode3.example.com
 testnode5.example.com&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API call to &lt;EM&gt;&lt;STRONG&gt;Start Kafka Broker on Node "testnode2.example.com"&lt;/STRONG&gt;&lt;/EM&gt; can be achieved as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# curl -iskH "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Start Kafka Broker","operation_level":{"level":"HOST_COMPONENT","cluster_name":"NewCluster","host_name":"testnode2.example.com","service_name":"KAFKA"}},"Body":{"HostRoles":{"state":"STARTED"}}}'  ttp://testnode1.example.com:8080/api/v1/clusters/NewCluster/hosts/testnode2.example.com/host_components/KAFKA_BROKER&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The API call to &lt;EM&gt;&lt;STRONG&gt;Stop Kafka Broker on Node "testnode2.example.com"&lt;/STRONG&gt; &lt;/EM&gt;can be achieved as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# curl -iskH "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Stop Kafka Broker","operation_level":{"level":"HOST_COMPONENT","cluster_name":"NewCluster","host_name":"testnode2.example.com","service_name":"KAFKA"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}'  ttp://testnode1.example.com:8080/api/v1/clusters/NewCluster/hosts/testnode2.example.com/host_components/KAFKA_BROKER&lt;/LI-CODE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 23:43:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290660#M215003</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2020-02-27T23:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: amari rest API + how to stop service on specific host</title>
      <link>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290661#M215004</link>
      <description>&lt;P&gt;Dear Jay +1 for your excellent answer&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will test this API soon when I will come to office ,&amp;nbsp; I will update soon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 00:11:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290661#M215004</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2020-02-28T00:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: amari rest API + how to stop service on specific host</title>
      <link>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290662#M215005</link>
      <description>&lt;P&gt;Dear Jay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when we run the API we get the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;master02 - is the machine with ambari server&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;kafka01 - is the first kafka machine&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where we are wrong ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -iskH "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Stop Kafka Broker","operation_level":{"level":"HOST_COMPONENT","cluster_name":"NwCluster","host_name":"kafka01","service_name":"KAFKA"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://master02:8080/api/v1/clusters/HDP_SYS76/hosts/kafka01/host_components/KAFKA_BROKER&lt;BR /&gt;HTTP/1.1 404 Not Found&lt;BR /&gt;X-Frame-Options: DENY&lt;BR /&gt;X-XSS-Protection: 1; mode=block&lt;BR /&gt;X-Content-Type-Options: nosniff&lt;BR /&gt;Cache-Control: no-store&lt;BR /&gt;Pragma: no-cache&lt;BR /&gt;Set-Cookie: AMBARISESSIONID=15lniq8gcyggwudtsp5sd70fp;Path=/;HttpOnly&lt;BR /&gt;Expires: Thu, 01 Jan 1970 00:00:00 GMT&lt;BR /&gt;User: admin&lt;BR /&gt;Content-Type: text/plain&lt;BR /&gt;Content-Length: 243&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"status" : 404,&lt;BR /&gt;"message" : "org.apache.ambari.server.controller.spi.NoSuchParentResourceException: Parent Host resource doesn't exist. Host not found, cluster=HDP_SYS76, hostname=kafka01. Host not found, cluster=HDP_SYS76, hostname=kafka01"&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 00:27:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290662#M215005</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2020-02-28T00:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: amari rest API + how to stop service on specific host</title>
      <link>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290663#M215006</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error says :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;hostname=kafka01. Host not found&lt;/LI-CODE&gt;&lt;P&gt;So please check if the Hostname is correct (i means fully qualified hostnmae)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please compare it with the hostname listed in the following API call response. Just try to open this URL in the browser to see which hostname ambari is expecting:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;http://ambari_server_hostname:8080/api/v1/clusters/$CLUSTER_NAME/hosts/&lt;/LI-CODE&gt;&lt;P&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 00:34:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290663#M215006</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2020-02-28T00:34:29Z</dc:date>
    </item>
  </channel>
</rss>

