Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ambari-server.py setup error

Highlighted

ambari-server.py setup error

New Contributor

Hi All,

I'm installing Hortonworks 2.5 and Ambari 2.5.0.3, on AWS, RedHat 7.

During the Ambari setup, I get an error missing some common module:

/usr/sbin/ambari-server.py setup --databasehost=localhost --databasename=ambari --databaseusername=ambari --postgresschema=ambari --databasepassword=ambari --databaseport=5432 --database=postgres -s Traceback (most recent call last):

File "/usr/sbin/ambari-server.py", line 29, in <module> from ambari_commons.exceptions import FatalException, NonFatalException ImportError: No module named ambari_commons.exceptions

I installed several time Hortonworks on centos6 and never get such error.

Any help will be appreciated.

Thanks

1 REPLY 1

Re: ambari-server.py setup error

Super Mentor

@Farhad Heybati

Try doing "yum reinstall ambari-server -y" and "yum reinstall ambari-agent -y" If that does not help then please refer to the following:

- This error seems to be related to some uncleaned installation. Mostly the "/usr/lib/ambari-server/lib/ambari_commons" and "/usr/lib/python2.6/site-packages/ambari_commons" might be incompletely installed (OR) corrupted (OR) might have some older version of installation. I will suggest you to try the following:

0). Clean ambari OLD installation. (Cleaning up the OLD Python Libraries installation is Really Important here)

yum remove ambari-server ambari-agent -y
rm -f /usr/sbin/ambari*
rm -f /usr/lib/python2.6/site-packages/ambari_commons
rm -rf /usr/lib/python2.6/site-packages/resource_management
rm -rf /usr/lib/python2.6/site-packages/ambari_jinja2
rm -rf /usr/lib/ambari-server
rm -rf /usr/lib/ambari-agent

1). Get the repo freshly.

wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.5.0.3/ambari.repo -O /etc/yum.repos.d/ambari.repo

2). Perform a yum cleanup

yum clean all

3). Now do a fresh reinstall or install of ambari binaries.

yum install ambari-server -y
yum install ambari-agent -y

4). Now perform the ambari-server setup again.

 /usr/sbin/ambari-server.py setup --databasehost=localhost --databasename=ambari --databaseusername=ambari --postgresschema=ambari --databasepassword=ambari --databaseport=5432 --database=postgres -s

.

Don't have an account?
Coming from Hortonworks? Activate your account here