<?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: Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3655#M538</link>
    <description>&lt;P&gt;yep you got it!&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2013 05:31:24 GMT</pubDate>
    <dc:creator>Grizzly</dc:creator>
    <dc:date>2013-12-03T05:31:24Z</dc:date>
    <item>
      <title>Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/2959#M534</link>
      <description>&lt;P&gt;Manager 4.7.3 on RHEL 6u3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting this problem consistently when attempting to add/manage the same host that the Manager Service has just been installed on. &amp;nbsp;I'm referring to the machine via its FQDN (rather than localhost), and I'm using the root account/password directly for SSH access. &amp;nbsp;A Parcels installation fails with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Installation failed. Failed to execute installation script.&lt;BR /&gt;Failed to execute installation script. (Current Step) Last Refreshed: Nov 7, 2013 6:19:30 AM UTC&lt;BR /&gt;/tmp/scm_prepare_node.ElXio0Jo&lt;BR /&gt;/tmp/scm_prepare_node.ElXio0Jo/scm_prepare_node.sh: could not find hostname or IP address of SCM server&lt;BR /&gt;usage: /tmp/scm_prepare_node.ElXio0Jo/scm_prepare_node.sh [options]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I look at that script, I see that it uses the environment-variable $SSH_CLIENT set by SSH to establish the hostname of the Manager server. &amp;nbsp;When I ssh-in as root, I can see that this variable is set correctly (it points to 127.0.0.1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get around this, I have to find the same scm_prepare_node.sh&amp;nbsp;command in the SCM logs and manually-append a --host argument to it. &amp;nbsp;It then completes successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible that the Manager is detecting that it is installing to the local host, and decides to bypass SSH login, leaving SSH_CLIENT unset and causing Manager-host detection in that script to fail?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 09:50:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/2959#M534</guid>
      <dc:creator>javabrett</dc:creator>
      <dc:date>2013-11-07T09:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3081#M535</link>
      <description>&lt;P&gt;What is the value of the "server_host" property inside this file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/etc/cloudera-scm-agent/config.ini&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, what does the 'hostname' command return? &amp;nbsp; &amp;nbsp;I would grep the results of the hostname command from /etc/hosts and make sure your host's name isn't on the loopback line (127.0.0.1) of /etc/hosts.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 20:56:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3081#M535</guid>
      <dc:creator>Clint</dc:creator>
      <dc:date>2013-11-12T20:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3651#M536</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a whiff of localhost. &amp;nbsp;My config.ini contains:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[General]&lt;BR /&gt;# Hostname of Cloudera SCM Server&lt;BR /&gt;server_host=localhost&lt;/P&gt;&lt;P&gt;# Port that server is listening on&lt;BR /&gt;server_port=7182&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure how/when the localhost adapter was selected. &amp;nbsp;hostname returns my host's short name:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# hostname&lt;BR /&gt;shortname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... and /etc/hosts contains something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# cat /etc/hosts&lt;BR /&gt;127.0.0.1 localhost.localdomain loghost&lt;BR /&gt;10.123.12.34 shortname.company.com shortname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I smell a rat with my networking configuration on this VM, but I can't be sure. &amp;nbsp;It isn't my VM template. &amp;nbsp;loghost instead of localhost alias above looks bad for starters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've proceeded with an RPM install of the Manager, followed by parcels, and that looks to be working better, so I'll stick with that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 05:18:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3651#M536</guid>
      <dc:creator>javabrett</dc:creator>
      <dc:date>2013-12-03T05:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3653#M537</link>
      <description>&lt;P&gt;hosts files should look like this on all nodes, where cehd3.test.lab is the name of the cluster node and its IP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@cehd3 conf]# cat /etc/hosts&lt;BR /&gt;127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4&lt;BR /&gt;::1 localhost localhost.localdomain localhost6 localhost6.localdomain6&lt;BR /&gt;10.100.101.43 cehd3.test.lab cehd3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;once that is in place (regardless of DNS config) confirm with the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;python -c "import socket; print socket.getfqdn(); print socket.gethostbyname(socket.getfqdn())"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 05:30:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3653#M537</guid>
      <dc:creator>Grizzly</dc:creator>
      <dc:date>2013-12-03T05:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3655#M538</link>
      <description>&lt;P&gt;yep you got it!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 05:31:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3655#M538</guid>
      <dc:creator>Grizzly</dc:creator>
      <dc:date>2013-12-03T05:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3751#M539</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The python test script output something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;shortname.company.com&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;10.123.12.34&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd be curious to know how the deployer is launching&amp;nbsp;&lt;SPAN&gt;scm_prepare_node.sh, that is the path through running-process to ssh to bash (presumably) to eventually launch the script. &amp;nbsp;It's hard to understand why SSH_CLIENT is not set (unless ssh is not being used to invoke the script remotely, even though everything is on localhost), but that does appear to be the case.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Brett&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2013 02:38:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/3751#M539</guid>
      <dc:creator>javabrett</dc:creator>
      <dc:date>2013-12-06T02:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scm_prepare_node.sh locating the manager host (via $SSH_CLIENT)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/8096#M540</link>
      <description>&lt;P&gt;For the benefit of others that may encounter this, the root cause of this problem was eventually identified. The problem was caused by the SSH-client-launched remote command running under a much older version of "bash", a version that had the (temporary) problem of not exporting the SSH_CLIENT variable to the environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can this happen and be obscure? It turns out that when the CM executes "ssh 'bash -c ...'", the remote SSH server relies on a static search PATH to locate "bash", which may be different from the path you pick-up with interactive shells.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To check if you have this (unlikely) problem, run this from a machine remote from the target machine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ ssh you@yourmachine.com 'which bash'&lt;BR /&gt;/usr/local/bin/bash&lt;BR /&gt;$ ssh you@yourmachine.com 'bash --version'&lt;BR /&gt;GNU bash, version 2.05.8(1)-release (i386-redhat-linux-gnu)&lt;BR /&gt;$ ssh you@yourmachine.com 'env | grep SSH_CLIENT'&lt;BR /&gt;SSH_CLIENT=10.1.2.3 56617 22&lt;BR /&gt;$ ssh you@yourmachine.com 'bash -c "env | grep SSH_CLIENT"'&lt;BR /&gt;(nothing)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the really old version of bash reported here for me, and the non-standard path. Then when "bash" is explicitly invoked when checking SSH_CLIENT, it is missing. You can compare this to the results from an interactive shell session. The version of bash above and some other versions around the same time do not correctly export SSH_CLIENT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The fix for this is eliminate the bad version of bash from the target machine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 00:36:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problem-with-scm-prepare-node-sh-locating-the-manager-host/m-p/8096#M540</guid>
      <dc:creator>javabrett</dc:creator>
      <dc:date>2014-03-31T00:36:41Z</dc:date>
    </item>
  </channel>
</rss>

