You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Daniel Osielczak (JIRA)" <ji...@apache.org> on 2015/03/11 14:22:38 UTC

[jira] [Created] (AMBARI-10027) amabri-server setup fails when used with non-Postgresql

Daniel Osielczak created AMBARI-10027:
-----------------------------------------

             Summary: amabri-server setup fails when used with non-Postgresql
                 Key: AMBARI-10027
                 URL: https://issues.apache.org/jira/browse/AMBARI-10027
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 1.7.0
         Environment: Oracle Linux 6.6 x64
            Reporter: Daniel Osielczak


I have installed amabri-server 1.7 using an RPM (from Hortonworks repositories). As I p[planned to use a MySQL database, I have made the required preparations (MySQL up and running, user and database created, scheme created).

[root@hedge ~]# /etc/init.d/ambari-server setup -s --database=mysql --databasehost=localhost --databaseport=3306 --databasename=ambari --databaseusername=ambari --databasepassword=***********
Using python  /usr/bin/python2.6
Setup ambari-server
Traceback (most recent call last):
  File "/usr/sbin/ambari-server.py", line 279, in <module>
    PG_HBA_DIR = utils.get_postgre_hba_dir(OS_FAMILY)
  File "/usr/lib/python2.6/site-packages/ambari_server/utils.py", line 198, in get_postgre_hba_dir
    os.symlink(glob.glob(PG_HBA_INIT_FILES[OS_FAMILY] + '*')[0],
IndexError: list index out of range

Turns out the setup script expects hba.conf to be there no matter which database is to be used:

PG_HBA_DIR = utils.get_postgre_hba_dir(OS_FAMILY)

    if not os.path.isfile(PG_HBA_INIT_FILES[OS_FAMILY]):
      # Link: /etc/init.d/postgresql --> /etc/init.d/postgresql-9.1
      os.symlink(glob.glob(PG_HBA_INIT_FILES[OS_FAMILY] + '*')[0],
                 PG_HBA_INIT_FILES[OS_FAMILY])

but gets nothing as posgres was never installed.

I have worked around it by assigning a static value:

PG_HBA_DIR = '/etc/pga/'

I guess this can be viewed as a bug or not (depending on point view), as the installation does require postgresql server as dependency.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)