ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Birender Saini (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-6886) Unable to run Ambari setup script on Amazon AMI (AWS) { Fix included }
Date Sat, 16 Aug 2014 16:11:21 GMT
Birender Saini created AMBARI-6886:
--------------------------------------

             Summary: 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: client, controller
    Affects Versions: 1.6.1
         Environment: Amazon AMI ( amzn-ami-hvm-2014.03.2.x86_64-ebs (ami-76817c1e)  ) 
            Reporter: Birender Saini
            Priority: Minor


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.2#6252)

Mime
View raw message