<?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: CM_API fails executing host_install in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77073#M47026</link>
    <description>Thanks I suppose this is solved!</description>
    <pubDate>Wed, 18 Jul 2018 08:41:15 GMT</pubDate>
    <dc:creator>tjford</dc:creator>
    <dc:date>2018-07-18T08:41:15Z</dc:date>
    <item>
      <title>CM_API fails executing host_install</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/76983#M47021</link>
      <description>&lt;P&gt;Ubuntu 16.04 LTS&lt;/P&gt;&lt;P&gt;Python 2 (and pip)&lt;/P&gt;&lt;P&gt;Docker version 1.13.1 (go 1.6.2 git commit 092cba3)&lt;/P&gt;&lt;P&gt;CM_API version 19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to automate the entire installation procedure (with Docker on my local development environment), which I expect it should be the same as following the web ui wizard. The example I use is based on &lt;A href="https://github.com/cloudera/cm_api/blob/master/python/examples/cluster_set_up.py" target="_blank"&gt;https://github.com/cloudera/cm_api/blob/master/python/examples/cluster_set_up.py&lt;/A&gt;. However, even with the sample python script i.e. cluster_set_up.py (with corresponded information modified for my local environment). It fails with error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Installing hosts. This might take a while.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cm_host_install failed: Failed to complete installation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to install cluster and services (kafka, and zookeeper) through web ui wizard without a problem. So I am not sure why this doesn't work through cm_api. And the error message is not clear indicating what goes wrong. Any place to debug and fix this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 16:17:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/76983#M47021</guid>
      <dc:creator>tjford</dc:creator>
      <dc:date>2018-07-16T16:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: CM_API fails executing host_install</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/76985#M47022</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27991"&gt;@tjford&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check out the Cloudera Manager logs for any issues.&lt;/P&gt;&lt;P&gt;Also, in Cloudera Manager, navigate to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;http://cm_host:7180/cmf/commands/commands&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Find the failed add hosts command there and see if you can discover any details there about the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE:&amp;nbsp; The "cm_host_install failed" message is from the example "cluster_set_up.py" and occurs when the host add command fails here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cm.host_install(host_username, host_list, password=host_password, cm_repo_url=cm_repo_url)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure you have configured your hosts' username and password.&amp;nbsp; The defaults are "root:cloudera"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;host_username = "root"&lt;BR /&gt;host_password = "cloudera"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you haven't changed those variable values then that's likely the cause as the user/pass would not be correct for your hosts.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 16:35:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/76985#M47022</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-07-16T16:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: CM_API fails executing host_install</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77035#M47023</link>
      <description>&lt;P&gt;The message logged in http://cm_host:7180/cmf/commands/commands is a bit obscure. It merely shows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Failed to complete installation on host 1 of 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Failed to complete installation on host 172.17.0.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where ip i.e 172.17.0.2 corresponds to cm_host in cluster_set_up.py&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Click 'Download' button (at the same level as &lt;STRONG&gt;Status&lt;/STRONG&gt; line) shows that the actually problem is &lt;STRONG&gt;Connection refused&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What service are expected for this communication? And which port should I open so the api host_install call can talk to that service?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Executing curl command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    curl -u "admin:&amp;lt;default ui pass&amp;gt;" -X POST -d '{"userName": "root", "password": "&amp;lt;default pass&amp;gt;", "hostNames": ["localhost"]}' -i -H content-type:application/json http://localhost:7180/api/v7/cm/commands/hostInstall


&lt;/PRE&gt;&lt;P&gt;returns&lt;/P&gt;&lt;PRE&gt;    HTTP/1.1 200 OK
    Expires: Thu, 01-Jan-1970 00:00:00 GMT
    Set-Cookie: CLOUDERA_MANAGER_SESSIONID=uw1r3bw5imx5140fu8714bzgb;Path=/;HttpOnly
    Content-Type: application/json
    Date: Tue, 17 Jul 2018 14:53:21 GMT
    Transfer-Encoding: chunked
    Server: Jetty(6.1.26.cloudera.4)

    {
        "id" : 16,
        "name" : "GlobalHostInstall",
        "startTime" : "2018-07-17T14:53:21.925Z",
        "active" : true,
        "children" : {
            "items" : [ ]
        }
    }


&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But checking url localhost:7180/cmf/command/30/details (through web ui), it's still complaing 'connection refused'&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 15:03:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77035#M47023</guid>
      <dc:creator>tjford</dc:creator>
      <dc:date>2018-07-17T15:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: CM_API fails executing host_install</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77043#M47024</link>
      <description>Checking api page - &lt;A href="https://cloudera.github.io/cm_api/apidocs/v19/path__cm_commands_hostInstall.html" target="_blank"&gt;https://cloudera.github.io/cm_api/apidocs/v19/path__cm_commands_hostInstall.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The command 'host_install' looks like for installing cloudera manager agent.&lt;BR /&gt;&lt;BR /&gt;Does this mean it's not necessary to execute host_install(...) function if cloudera-scm-agent is already presented (installed through package manager)?</description>
      <pubDate>Tue, 17 Jul 2018 15:31:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77043#M47024</guid>
      <dc:creator>tjford</dc:creator>
      <dc:date>2018-07-17T15:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: CM_API fails executing host_install</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77055#M47025</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27991"&gt;@tjford&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yup, if you have already installed the "cloudera-manager-agent" and "cloudera-manager-daemons" packages, configured the agent's config.ini with the server_host as your CM host, and started it (so that it is heartbeating to Cloudera Manager) then you can probably just add it to the cluster using this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cloudera.github.io/cm_api/apidocs/v5.15.0/path__clusters_-clusterName-_hosts.html" target="_blank"&gt;https://cloudera.github.io/cm_api/apidocs/v5.15.0/path__clusters_-clusterName-_hosts.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 18:43:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77055#M47025</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-07-17T18:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: CM_API fails executing host_install</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77073#M47026</link>
      <description>Thanks I suppose this is solved!</description>
      <pubDate>Wed, 18 Jul 2018 08:41:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CM-API-fails-executing-host-install/m-p/77073#M47026</guid>
      <dc:creator>tjford</dc:creator>
      <dc:date>2018-07-18T08:41:15Z</dc:date>
    </item>
  </channel>
</rss>

