<?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: Install of HDP fails with &amp;quot;ValueError: invalid literal for int() with base 10: 'usr'&amp;quot; for App Timeline Server Install in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98530#M11910</link>
    <description>&lt;P&gt;I found a similar issue, where /usr/hdp contained a file derby.log&lt;/P&gt;&lt;P&gt;The issue is printVersions should filter based on a directory pattern of "(\d+\.{0,1}.*)-(\d+)"&lt;/P&gt;&lt;P&gt;234 if f notin [".", "..", "current", "share", "lost+found"]:&lt;/P&gt;&lt;P&gt;235 result[tuple(map(int, versionRegex.split(f)))] = f&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2016 07:09:53 GMT</pubDate>
    <dc:creator>patrick_oleary</dc:creator>
    <dc:date>2016-04-08T07:09:53Z</dc:date>
    <item>
      <title>Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98527#M11907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; the HDP install (with ambari) fails in step "App Timeline Server Install". The error message is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;resource_management.core.exceptions.Fail: Execution of 'ambari-sudo.sh  -H -E touch /var/lib/ambari-agent/data/hdp-select-set-all.performed ; ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.3 | tail -1`' returned 1. Traceback (most recent call last):
  File "/usr/bin/hdp-select", line 378, in &amp;lt;module&amp;gt;
    printVersions()
  File "/usr/bin/hdp-select", line 235, in printVersions
    result[tuple(map(int, versionRegex.split(f)))] = f
ValueError: invalid literal for int() with base 10: 'usr'
ERROR: set command takes 2 parameters, instead of 1

usage: hdp-select [-h] [&amp;lt;command&amp;gt;] [&amp;lt;package&amp;gt;] [&amp;lt;version&amp;gt;]

Set the selected version of HDP.

positional arguments:&lt;/PRE&gt;&lt;P&gt;Does it matter if the /usr/hdp directory already exists (is a symlink to a partition with enough space and is empty) ?&lt;/P&gt;&lt;P&gt;Thanks Peter.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 19:56:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98527#M11907</guid>
      <dc:creator>peter_bartal</dc:creator>
      <dc:date>2015-12-10T19:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98528#M11908</link>
      <description>&lt;P&gt;I have added the value "usr" to the list on line 234 in script /usr/bin/hdp-select and it seems to work. I did not run any cleanup. The HDP version is 2.3.2.0-2950 &lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 17:14:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98528#M11908</guid>
      <dc:creator>peter_bartal</dc:creator>
      <dc:date>2015-12-17T17:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98529#M11909</link>
      <description>&lt;P&gt;Peter can you add your code snippet here that you changed?  I'm seeing the same issue with trying to install HDP 2.4.0.0-169&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 23:31:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98529#M11909</guid>
      <dc:creator>hugoa_schieck</dc:creator>
      <dc:date>2016-03-17T23:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98530#M11910</link>
      <description>&lt;P&gt;I found a similar issue, where /usr/hdp contained a file derby.log&lt;/P&gt;&lt;P&gt;The issue is printVersions should filter based on a directory pattern of "(\d+\.{0,1}.*)-(\d+)"&lt;/P&gt;&lt;P&gt;234 if f notin [".", "..", "current", "share", "lost+found"]:&lt;/P&gt;&lt;P&gt;235 result[tuple(map(int, versionRegex.split(f)))] = f&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 07:09:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98530#M11910</guid>
      <dc:creator>patrick_oleary</dc:creator>
      <dc:date>2016-04-08T07:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98531#M11911</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1223/peterbartal.html" nodeid="1223"&gt;@Peter Bartal&lt;/A&gt; Am not a python person so bare with me&lt;/P&gt;&lt;P&gt;I think if there was a regex compile&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;filter = regex.compile((\d+\.{0,1}.*)-(\d+))&lt;/P&gt;&lt;P&gt;if filter.match(f)&lt;/P&gt;&lt;P&gt;    result[tuple(map(int, versionRegex.split(f)))] = f&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;That should solve the problem&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 07:12:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98531#M11911</guid>
      <dc:creator>patrick_oleary</dc:creator>
      <dc:date>2016-04-08T07:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98532#M11912</link>
      <description>&lt;P&gt;I found a similar issue, where /usr/hdp contained a file derby.log&lt;/P&gt;&lt;P&gt;The issue is printVersions should filter based on a directory pattern of "(\d+\.{0,1}.*)-(\d+)"&lt;/P&gt;&lt;P&gt;234 if f notin [".", "..", "current", "share", "lost+found"]:&lt;/P&gt;&lt;P&gt;235 result[tuple(map(int, versionRegex.split(f)))] = f&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2016 23:08:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98532#M11912</guid>
      <dc:creator>patrick_oleary</dc:creator>
      <dc:date>2016-04-23T23:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98533#M11913</link>
      <description>&lt;P&gt;Below is code snippet &lt;/P&gt;&lt;PRE&gt;def printVersions():
  result = {}
  for f in os.listdir(root):
    if f not in [".", "..", "current", "share", "lost+found","usr"]:
      result[tuple(map(int, versionRegex.split(f)))] = f
  keys = result.keys()
  keys.sort()
  for k in keys:
     print result[k]
&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Apr 2016 12:29:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98533#M11913</guid>
      <dc:creator>vgdhavale10</dc:creator>
      <dc:date>2016-04-28T12:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98534#M11914</link>
      <description>&lt;PRE&gt;def printVersions():
  result = {}
  for f in os.listdir(root):
    if f not in [".", "..", "current", "share", "lost+found","docker"]:
      result[tuple(map(int, versionRegex.split(f)))] = f
  keys = result.keys()
 ....&lt;/PRE&gt;&lt;P&gt;This fixed my issue. Happened to me when i was restarting Hbase to deploy a service on Ambari and hbase client wouldn't install.It said "docker" in printVersions function,  instead of "usr". Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 03:50:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98534#M11914</guid>
      <dc:creator>ganne</dc:creator>
      <dc:date>2016-05-04T03:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98535#M11915</link>
      <description>&lt;PRE&gt;This fixed my issue. Happened to me when i was restarting Hbase to deploy a service on Ambari and hbase client wouldn't install.It said "hadoop" in printVersions function, instead of "usr" or "docker". I have observed that we need to give that user that prompts
in the error msg when we run this command from /var/lib/ambari-agent : ./ambari-sudo.sh
/usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions |
grep ^2.3.2.0-2950 | tail -1` 

Thanks!


go to /usr/bin/

vi hdp-select

Change Print the installed packages code to appropriate error user:

	# Print the installed packages
def printVersions():
  result = {}
  for f in os.listdir(root):
    if f not in [".", "..", "current", "share", "lost+found","hadoop"]:
      result[tuple(map(int, versionRegex.split(f)))] = f
  keys = result.keys()
  keys.sort()
  for k in keys:
     print result[k]&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 May 2016 22:49:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98535#M11915</guid>
      <dc:creator>bandarusridhar1</dc:creator>
      <dc:date>2016-05-12T22:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98536#M11916</link>
      <description>&lt;P&gt;Faced this issue while installing HDP 2.4.2 on Centos 7.x.&lt;/P&gt;&lt;P&gt;Fix for this issue depends on details in error message.&lt;/P&gt;&lt;P&gt;ValueError: invalid literal forint()withbase10:'&lt;STRONG&gt;hadoop&lt;/STRONG&gt;' &lt;STRONG&gt;&amp;lt;--&lt;/STRONG&gt; base on this vale need to modify function - &lt;STRONG&gt;printVersions&lt;/STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt;in file &lt;STRONG&gt;/usr/bin/hdp-select&lt;/STRONG&gt; on all nodes.&lt;/P&gt;&lt;P&gt;Easy part is this file is same on all nodes ,you can do changes on one node and clush it to all nodes.&lt;/P&gt;&lt;PRE&gt;clush -ab md5sum /usr/bin/hdp-select
vim /usr/bin/hdp-select
#modify below function..
Clush -ab -c /usr/bin/hdp-select&lt;/PRE&gt;
&lt;PRE&gt;def printVersions():
  ......
  ......
    if f not in [".", "..", "current", "share", "lost+found","hadoop"]:
  ......
&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jun 2016 11:41:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98536#M11916</guid>
      <dc:creator>prakash_tirumal</dc:creator>
      <dc:date>2016-06-14T11:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98537#M11917</link>
      <description>&lt;P&gt;I had this same issue when trying to upgrade from HDP 2.3 to HDP 2.4. This is a bug (or serious weakness) in script /usr/bin/hdp-select which does not tolerate any other files or subdirectories under your root folder (in my case /usr/hdp ). This folder should only contain two sub-folders, one named current and one with a version-number of current HDP.&lt;/P&gt;&lt;P&gt;I had places a backup folder in there and got the same install error &lt;/P&gt;&lt;PRE&gt;ValueError: invalid literal forint()withbase10:'backup'&lt;/PRE&gt;&lt;P&gt;when trying to install Grafana according to Ambari upgrade documentation.&lt;/P&gt;&lt;P&gt;My fix  (instead of modifying the script as above) was to move my backupfolder from that folder to a different location (or to remove it all together if not needed).&lt;/P&gt;&lt;P&gt;A agree with the fix proposed by &lt;A rel="user" href="https://community.cloudera.com/users/4349/patrickoleary.html" nodeid="4349"&gt;@patrick o'leary&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 17:20:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98537#M11917</guid>
      <dc:creator>eirik_ora</dc:creator>
      <dc:date>2016-06-22T17:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98538#M11918</link>
      <description>&lt;P&gt;This worked for me &lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 20:33:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98538#M11918</guid>
      <dc:creator>shihab_pri</dc:creator>
      <dc:date>2016-08-05T20:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98539#M11919</link>
      <description>&lt;P&gt;Just removed the extra directories expect the current and other one it worked&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 20:34:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98539#M11919</guid>
      <dc:creator>shihab_pri</dc:creator>
      <dc:date>2016-08-05T20:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98540#M11920</link>
      <description>&lt;P&gt;This is a known issue with /usr/bin/hdp-select script. The script does not honor any dir except from "CURRENT" and other HDP stack versions. There is an exception in few HDP version where it can tolerate "Share" and "lost+found"  folders. 
You can remove anything except these folder to another location and try again.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 04:39:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98540#M11920</guid>
      <dc:creator>lraheja</dc:creator>
      <dc:date>2016-08-31T04:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Install of HDP fails with "ValueError: invalid literal for int() with base 10: 'usr'" for App Timeline Server Install</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98541#M11921</link>
      <description>&lt;P&gt;Thanks. I had created few folder under /usr/hdp and faced same issue.&lt;/P&gt;&lt;P&gt;It's a good practice to not to create any files, folders under /usr/hdp as the script doesn't like it.&lt;/P&gt;&lt;P&gt;Easy to move/create the folders (Thank modifying the script) somewhere else if required. &lt;/P&gt;&lt;P&gt;And that solves my issue!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 17:38:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Install-of-HDP-fails-with-quot-ValueError-invalid-literal/m-p/98541#M11921</guid>
      <dc:creator>Vinay_Prakash</dc:creator>
      <dc:date>2017-01-10T17:38:20Z</dc:date>
    </item>
  </channel>
</rss>

