You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Birender Saini (JIRA)" <ji...@apache.org> on 2014/09/26 08:55:34 UTC
[jira] [Updated] (AMBARI-6886) Unable to run Ambari setup script on
Amazon AMI (AWS) { Fix included }
[ https://issues.apache.org/jira/browse/AMBARI-6886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Birender Saini updated AMBARI-6886:
-----------------------------------
Attachment: ambari-6886-patch
Patch for this issue
> Unable to run Ambari setup script on Amazon AMI (AWS) { Fix included }
> -----------------------------------------------------------------------
>
> Key: AMBARI-6886
> URL: https://issues.apache.org/jira/browse/AMBARI-6886
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server, ambari-web
> Affects Versions: 1.6.1
> Environment: Amazon AMI ( amzn-ami-hvm-2014.03.2.x86_64-ebs (ami-76817c1e) )
> Reporter: Birender Saini
> Priority: Minor
> Labels: amazon, ami, install
> Fix For: 2.1.0
>
> Attachments: ambari-6886-patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Running ambari-server on Amazon AMI fails with the error message shown below.
> ----------------
> [ec2-user@ip-xx-xx-xx-xx ~]$ sudo ambari-server setup
> Using python /usr/bin/python2.6
> Setup ambari-server
> Traceback (most recent call last):
> File "/usr/sbin/ambari-server.py", line 53, in <module>
> OS_VERSION = OSCheck().get_os_major_version()
> File "/usr/lib/python2.6/site-packages/ambari_commons/os_check.py", line 155, in get_os_major_version
> return OSCheck.get_os_version().split('.')[0]
> File "/usr/lib/python2.6/site-packages/ambari_commons/os_check.py", line 146, in get_os_version
> raise Exception("Cannot detect os version. Exiting...")
> Exception: Cannot detect os version. Exiting…
> ----------------
> This is affected by the python bug - http://bugs.python.org/issue18872
> --- FIX ---
> Change line number 32 in function linux_distribution()
> FROM
> linux_distribution = platform.linux_distribution()
> TO
> linux_distribution = platform.linux_distribution(supported_dists=['system'])
> -- FINAL CODE --
> …..
> 26 def linux_distribution():
> 27 PYTHON_VER = sys.version_info[0] * 10 + sys.version_info[1]
> 28
> 29 if PYTHON_VER < 26:
> 30 linux_distribution = platform.dist()
> 31 else:
> 32 linux_distribution = platform.linux_distribution(supported_dists=['system'])
> 33
> 34 return linux_distribution
> …..
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)