<?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: Problems with /usr/bin/hdp-select versions in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184453#M61650</link>
    <description>&lt;P&gt;Thank you all for your suggestions.  I did clear up any items you may have mentioned and still had the problem.  I resolved this issue with hdp-select by re-provisioning all of the servers in the cluster and reinstalling Ambari.  This particular item is closed.&lt;/P&gt;</description>
    <pubDate>Thu, 25 May 2017 20:48:51 GMT</pubDate>
    <dc:creator>michaelallen</dc:creator>
    <dc:date>2017-05-25T20:48:51Z</dc:date>
    <item>
      <title>Problems with /usr/bin/hdp-select versions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184448#M61645</link>
      <description>&lt;P&gt;I consistently get this hdp-seletct error in Ambari whenever I try to deploy any service.  Can anyone help?&lt;/P&gt;&lt;P&gt;[root@hwmn1 yum.repos.d]# cat /var/lib/ambari-agent/data/errors-593.txt
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 37, in &amp;lt;module&amp;gt;
  AfterInstallHook().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 314, in execute
  method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 31, in hook
  setup_stack_symlinks()
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py", line 52, in setup_stack_symlinks
  stack_select.select_all(version)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/stack_select.py", line 135, in select_all
  Execute(command, only_if = only_if_command)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
  self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
  self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
  provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 262, in action_run
  tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72, in inner
  result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 102, in checked_call
  tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper
  result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call
  raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.6 | tail -1`' returned 1. ERROR: set command takes 2 parameters, instead of 1&lt;/P&gt;&lt;P&gt;usage: distro-select [-h] [&amp;lt;command&amp;gt;] [&amp;lt;package&amp;gt;] [&amp;lt;version&amp;gt;]&lt;/P&gt;&lt;P&gt;Set the selected version of HDP.&lt;/P&gt;&lt;P&gt;positional arguments:
  &amp;lt;command&amp;gt;  One of set, status, versions, or packages
  &amp;lt;package&amp;gt;  the package name to set
  &amp;lt;version&amp;gt;  the HDP version to set&lt;/P&gt;&lt;P&gt;optional arguments:
  -h, --help  show this help message and exit
  -r, --rpm-mode  if true checks if there is symlink exists and creates the symlink if it doesn't&lt;/P&gt;&lt;P&gt;Commands:
  set  : set the package to a specified version
  status  : show the version of the package
  versions : show the currently installed versions
  packages : show the individual package names
[root@hwmn1 yum.repos.d]#
[root@hwmn1 yum.repos.d]#
[root@hwmn1 yum.repos.d]# cat /var/lib/ambari-agent/data/errors-593.txt
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 37, in &amp;lt;module&amp;gt;
  AfterInstallHook().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 314, in execute
  method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 31, in hook
  setup_stack_symlinks()
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py", line 52, in setup_stack_symlinks
  stack_select.select_all(version)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/stack_select.py", line 135, in select_all
  Execute(command, only_if = only_if_command)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
  self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
  self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
  provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 262, in action_run
  tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72, in inner
  result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 102, in checked_call
  tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper
  result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call
  raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-sudo.sh /usr/bin/&lt;STRONG&gt;hdp-select&lt;/STRONG&gt; set all `ambari-python-wrap /usr/bin/&lt;STRONG&gt;hdp-select&lt;/STRONG&gt; versions | grep ^2.6 | tail -1`' returned 1. ERROR: set command takes 2 parameters, instead of 1&lt;/P&gt;&lt;P&gt;usage: distro-select [-h] [&amp;lt;command&amp;gt;] [&amp;lt;package&amp;gt;] [&amp;lt;version&amp;gt;]&lt;/P&gt;&lt;P&gt;Set the selected version of HDP.&lt;/P&gt;&lt;P&gt;positional arguments:
  &amp;lt;command&amp;gt;  One of set, status, versions, or packages
  &amp;lt;package&amp;gt;  the package name to set
  &amp;lt;version&amp;gt;  the HDP version to set&lt;/P&gt;&lt;P&gt;optional arguments:
  -h, --help  show this help message and exit
  -r, --rpm-mode  if true checks if there is symlink exists and creates the symlink if it doesn't&lt;/P&gt;&lt;P&gt;Commands:
  set  : set the package to a specified version
  status  : show the version of the package
  versions : show the currently installed versions
  packages : show the individual package names
[root@hwmn1 yum.repos.d]#&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 01:13:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184448#M61645</guid>
      <dc:creator>michaelallen</dc:creator>
      <dc:date>2017-05-24T01:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with /usr/bin/hdp-select versions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184449#M61646</link>
      <description>&lt;P&gt;I ran "/usr/bin/hdp-select versions" and it failed.
I realized hadoop was not suppose to be in /usr/hdp directory.  I deleted it and re-ran "/usr/bin/hdp-select versions" after removing the hadoop directory from /usr/hdp.  I listed the directory again after the deploy failed again and noticed the hadoop directory had been recreated. Not sure why hadoop directory is beiing recreated in /usr/hdp during deploy.&lt;/P&gt;&lt;P&gt;Here is the sequence of commands.&lt;/P&gt;&lt;P&gt;[root@hwmn1 yum.repos.d]# /usr/bin/hdp-select versions &lt;/P&gt;&lt;P&gt;ERROR: Unexpected file/directory found in /usr/hdp: hadoop&lt;/P&gt;&lt;P&gt; [root@hwmn1 yum.repos.d]# cd /usr/hdp&lt;/P&gt;&lt;P&gt; [root@hwmn1 hdp]# ls -ltr&lt;/P&gt;&lt;P&gt; total 16
drwxr-xr-x  3 root root 4096 May 23 13:00 share &lt;/P&gt;&lt;P&gt;drwxr-xr-x 22 root root 4096 May 23 14:31 2.6.0.3-8 &lt;/P&gt;&lt;P&gt;drwxr-xr-x  2 root root 4096 May 23 14:31 current &lt;/P&gt;&lt;P&gt;drwxr-xr-x  3 root root 4096 May 23 14:31 hadoop &lt;/P&gt;&lt;P&gt;[root@hwmn1 hdp]# rm -fR hadoop&lt;/P&gt;&lt;P&gt; [root@hwmn1 hdp]# ls -ltr &lt;/P&gt;&lt;P&gt;total 12
drwxr-xr-x  3 root root 4096 May 23 13:00 share &lt;/P&gt;&lt;P&gt;drwxr-xr-x 22 root root 4096 May 23 14:31 2.6.0.3-8 &lt;/P&gt;&lt;P&gt;drwxr-xr-x  2 root root 4096 May 23 14:31 current &lt;/P&gt;&lt;P&gt;[root@hwmn1 hdp]# ls -ltr &lt;/P&gt;&lt;P&gt;total 16
drwxr-xr-x  3 root root 4096 May 23 13:00 share &lt;/P&gt;&lt;P&gt;drwxr-xr-x 22 root root 4096 May 23 14:31 2.6.0.3-8&lt;/P&gt;&lt;P&gt; drwxr-xr-x  2 root root 4096 May 23 14:35 current &lt;/P&gt;&lt;P&gt;drwxr-xr-x  3 root root 4096 May 23 14:35 hadoop &lt;/P&gt;&lt;P&gt;[root@hwmn1 hdp]# pwd &lt;/P&gt;&lt;P&gt;/usr/hdp &lt;/P&gt;&lt;P&gt;[root@hwmn1 hdp]# /usr/bin/hdp-select versions &lt;/P&gt;&lt;P&gt;ERROR: Unexpected file/directory found in /usr/hdp: hadoop &lt;/P&gt;&lt;P&gt;[root@hwmn1 hdp]#&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 01:56:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184449#M61646</guid>
      <dc:creator>michaelallen</dc:creator>
      <dc:date>2017-05-24T01:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with /usr/bin/hdp-select versions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184450#M61647</link>
      <description>&lt;P&gt;Yes, during deploy it will re-create following directory /usr/hdp/hadoop/. &lt;/P&gt;&lt;P&gt;from where you trying to deploy HDP in host machine...like thru ambari url or manual process ? &lt;/P&gt;&lt;P&gt;Have you setup correctly repo files ? &lt;/P&gt;&lt;P&gt;output :&lt;/P&gt;&lt;P&gt;yum repolist   &lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 10:26:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184450#M61647</guid>
      <dc:creator>rajan_csp</dc:creator>
      <dc:date>2017-05-24T10:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with /usr/bin/hdp-select versions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184451#M61648</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18541/michaelallen.html" nodeid="18541"&gt;@Michael Allen&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error that you are getting indicates that you might be having some additional directories inside the "/usr/hdp" directory.  Please remove any other unwanted directory from the mentioned directory.&lt;/P&gt;&lt;PRE&gt;[root@hwmn1 yum.repos.d]# /usr/bin/hdp-select versions 
ERROR: Unexpected file/directory found in /usr/hdp: hadoop&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;I suspect that you have "/usr/hdp/hadoop" directory added on your own which seems to be causing the issue here.  Please try moving it to some other place and then try again. &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example: &lt;/STRONG&gt;At my end i see the structure of the mentioned directory as following:&lt;/P&gt;&lt;PRE&gt;# cd /usr/hdp/
# ls -lart
total 24

drwxr-xr-x  1 root root 4096 Apr 19 19:11 share
drwxr-xr-x  1 root root 4096 Apr 19 18:26 ..
drwxr-xr-x 32 root root 4096 Apr 19 19:13 2.5.0.0-1245
drwxr-xr-x  1 root root 4096 Apr 19 19:13 2.6.0.3-8
drwxr-xr-x  1 root root 4096 May 13 09:40 current&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Can you please share the "hdp-select" RPM version that you have on your host?  You might be having an incorrect version of hdp-select i guess. &lt;/P&gt;&lt;PRE&gt;# rpm -qa | grep hdp-select
hdp-select-2.6.0.3-8.el6.noarch&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Also the output of the repository.&lt;/P&gt;&lt;PRE&gt;# cat /etc/yum.repos.d/HDP.repo &lt;/PRE&gt;</description>
      <pubDate>Wed, 24 May 2017 10:47:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184451#M61648</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-05-24T10:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with /usr/bin/hdp-select versions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184452#M61649</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18541/michaelallen.html" nodeid="18541"&gt;@Michael Allen&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also initially we see that you are getting this error:
&lt;/P&gt;&lt;PRE&gt;'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.6 | tail -1`' returned 1. ERROR: set command takes 2 parameters, instead of 1&lt;/PRE&gt;&lt;P&gt;
Above error can occur only when the second argument after the "all" is null.  &lt;/P&gt;&lt;P&gt;
&lt;STRONG&gt;For example:  &lt;/STRONG&gt;(If we do not pass the second argument then it will fail as following)&lt;/P&gt;&lt;PRE&gt;[root@sandbox hdp]# /usr/bin/hdp-select set all 
ERROR: set command takes 2 parameters, instead of 1&lt;/PRE&gt;&lt;P&gt;
- So in your case i am suspecting that the second argument is becoming null (empty)
In order to verify the same can you please check what is the output of the following command you are getting?&lt;/P&gt;&lt;PRE&gt;[root@sandbox bin]# echo `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.6 | tail -1`
2.6.0.3-8&lt;/PRE&gt;&lt;P&gt;
-  If you have HDP 2.6 repo properly configured and if your "/usr/hdp" directory has the correct contents including the "2.6.0.3-8" directory then it should return the result else the result might be empty.  

&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;[root@sandbox bin]# echo `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.6 | tail -1`
2.6.0.3-8

[root@sandbox bin]# echo `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.7 | tail -1`

[root@sandbox bin]# ls -l /usr/hdp/
total 16
drwxr-xr-x 32 root root 4096 Apr 19 19:13 2.5.0.0-1245
drwxr-xr-x  1 root root 4096 Apr 19 19:13 2.6.0.3-8
drwxr-xr-x  1 root root 4096 May 24 04:09 current
drwxr-xr-x  1 root root 4096 Apr 19 19:11 share
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So please check if your "/usr/hdp" directory is containing the "2.6.0.3-8" directory or not else the second argument of the &lt;STRONG&gt;hdp-select set all  &amp;lt;null&amp;gt;&lt;/STRONG&gt;  command will show the same error.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 12:45:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184452#M61649</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-05-24T12:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with /usr/bin/hdp-select versions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184453#M61650</link>
      <description>&lt;P&gt;Thank you all for your suggestions.  I did clear up any items you may have mentioned and still had the problem.  I resolved this issue with hdp-select by re-provisioning all of the servers in the cluster and reinstalling Ambari.  This particular item is closed.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 20:48:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184453#M61650</guid>
      <dc:creator>michaelallen</dc:creator>
      <dc:date>2017-05-25T20:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with /usr/bin/hdp-select versions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184454#M61651</link>
      <description>&lt;P&gt;Make sure that you have installed this RPMS on all node.&lt;/P&gt;&lt;P&gt;libtirpc-devel-0.2.4-0.15.el7.x86_64&lt;/P&gt;&lt;P&gt;libtirpc-0.2.4-0.15.el7.x86_64&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 20:35:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-usr-bin-hdp-select-versions/m-p/184454#M61651</guid>
      <dc:creator>khalid</dc:creator>
      <dc:date>2019-04-05T20:35:46Z</dc:date>
    </item>
  </channel>
</rss>

