【发布时间】:2017-02-12 10:43:15
【问题描述】:
我正在单个实例 RHEL 7 节点上设置 Hortonworks Hadoop 堆栈。我被困在我设置ambari-server 的部分,使用我的 PostgreSQL 9.2.15 数据库(不是默认的,不是嵌入式的)。
我还打算将同一个 PostgreSQL 实例用于 Hive 和 Oozie。
按照此处的说明操作后:
以下是我命名数据库、用户和架构的方式:
ambari, ambari, ambari
hive, hive
oozie, oozie
这就是我配置 /var/lib/pgsql/data/pg_hba.conf 文件的方式:
# Default
local all all peer
host all all 127.0.0.1/32 ident
# added settings
local all ambari md5
host all ambari 0.0.0.0/0 md5
host all ambari ::/0 md5
host oozie oozie <my-host-ip>/0 md5
host hive hive <my-host-ip>/0 md5
我为 Hive 和 Oozie 运行这个:
$ ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar
然后是实际的 Ambari 设置
$ ambari-server setup
Enter advanced database configuration [y/n]? y
...
Enter choice (1): 4
Hostname (localhost): <my-fqdn-host-name>
Port (5432):
Database name (ambari):
Postgres schema (ambari):
Username (ambari):
Enter Database Password (bigdata) : <my-ambari-password>
但是,我无法启动 ambari-server,因为我从 /var/log/ambari-server/ambari-server.log 获得了很多行:
Internal Exception: org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "ambari"
虽然我确定我的密码是正确的,我什至可以使用连接
$ psql -h <my-fqdn-host-name> -U ambari -d ambari -W
password: <my-ambari-password>
$ psql -h <my-host-ip> -U ambari -d ambari -W
password: <my-ambari-password>
但是,我无法连接
$ psql -h localhost -U ambari -d ambari -W
password: <my-ambari-password>
psql: FATAL: Ident authentication failed for user "ambari"
$ psql -h 127.0.0.1 -U ambari -d ambari -W
password: <my-ambari-password>
psql: FATAL: Ident authentication failed for user "ambari"
我得到的错误与从 /var/log/ambari-server/ambari-server.log 得到的错误相同。我怀疑ambari-server setup 是通过localhost 连接的,这就是我得到同样错误的原因。
您能告诉我我的 Ambari 和/或 Postgres 配置有什么问题吗?
【问题讨论】:
标签: postgresql postgresql-9.2 hortonworks-data-platform ambari rhel7