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.

Not able to reinstall ambari - ubuntu 16.04

Highlighted

Not able to reinstall ambari - ubuntu 16.04

Am getting the below error when i execute " ambar-server setup"

followed : installation link


Using python /usr/bin/python

Resetting ambari-server

Traceback (most recent call last):

File "/usr/sbin/ambari-server.py", line 28, in <module>

from ambari_commons.exceptions import FatalException, NonFatalException

ImportError: No module named åambari_commons.exceptions

5 REPLIES 5
Highlighted

Re: Not able to reinstall ambari - ubuntu 16.04

@Farhad Heybati pls help i followed your solution given for centos here

Highlighted

Re: Not able to reinstall ambari - ubuntu 16.04

Super Mentor

@pruthvi kumar

Not sure what is the exact issue here and which version of Ambari and Python are oyu using.

However can you try running the "ambari-server setup" command after running the following PYTHONPATH export command to see if it works?


# export PYTHONPATH=/usr/lib/ambari-server/lib:/usr/lib/ambari-server/lib/ambari_jinja2:/usr/lib/ambari-server/lib/ambari_commons:/usr/lib/ambari-server/lib/ambari_server:/usr/lib/ambari-server/lib/ambari_simplejson:/usr/lib/ambari-server/lib/resource_management

# ambar-server setup



.

It might have happened if the Ambari Server binaries are not completely installed.
So please check if the following paths exist:


Example:

   # ls -l /usr/lib/ambari-server/lib/ambari_commons
   # ls -l /usr/lib/ambari-server/lib/ambari_commons/exceptions.py



Or better try to reinstall ambari server binaries. Like "yum reinstall ambari-server" if you find some python binaries missing.


.

Highlighted

Re: Not able to reinstall ambari - ubuntu 16.04

@Jay Kumar SenSharma Thank you for the answer, am using python2.7 after adding python path u have give am getting the bellow error, by the way am using ubunut 16.4 so i can not use yum reinstall


Setup ambari-server

ERROR: File ambari.properties not found in search path $AMBARI_CONF_DIR: /etc/ambari-server/conf

Traceback (most recent call last):

File "/usr/sbin/ambari-server.py", line 37, in <module>

from ambari_server.checkDatabase import check_database

File "/usr/lib/ambari-server/lib/ambari_server/checkDatabase.py", line 26, in <module>

from ambari_server import serverConfiguration

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 603, in <module>

configDefaults = ServerConfigDefaults()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 512, in __init__

super(ServerConfigDefaultsLinux, self).__init__()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 366, in __init__

properties = get_ambari_properties()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 252, in get_ambari_properties

conf_file = find_properties_file()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 245, in find_properties_file

raise FatalException(1, err)

ambari_commons.exceptions.FatalException: 'Fatal exception: File ambari.properties not found in search path $AMBARI_CONF_DIR: /etc/ambari-server/conf, exit code 1'

Highlighted

Re: Not able to reinstall ambari - ubuntu 16.04

@Jay Kumar SenSharma Thanks for the answer, am using python2.7 all files are present in /usr/lib/ambari-server.

After adding above python path mentioned am getting the below error


Using python /usr/bin/python

Setup ambari-server

ERROR: File ambari.properties not found in search path $AMBARI_CONF_DIR: /etc/ambari-server/conf

Traceback (most recent call last):

File "/usr/sbin/ambari-server.py", line 37, in <module>

from ambari_server.checkDatabase import check_database

File "/usr/lib/ambari-server/lib/ambari_server/checkDatabase.py", line 26, in <module>

from ambari_server import serverConfiguration

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 603, in <module>

configDefaults = ServerConfigDefaults()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 512, in __init__

super(ServerConfigDefaultsLinux, self).__init__()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 366, in __init__

properties = get_ambari_properties()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 252, in get_ambari_properties

conf_file = find_properties_file()

File "/usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py", line 245, in find_properties_file

raise FatalException(1, err)

ambari_commons.exceptions.FatalException: 'Fatal exception: File ambari.properties not found in search path $AMBARI_CONF_DIR: /etc/ambari-server/conf, exit code 1'

Highlighted

Re: Not able to reinstall ambari - ubuntu 16.04

@Akhil S Naik pls help

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