我在单个实例RHEL 7节点上设置Hortonworks Hadoop堆栈。我被困在设置ambari-server的部分,使用PostgreSQL 9.2.15数据库(不是默认的,不是嵌入式的)。
我还打算为Hive和Oozie使用相同的PostgreSQL实例。
在遵循这里的指示之后:
下面是我如何命名我的数据库、用户和模式:
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我为蜂巢和乌兹运行这个:
$ ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar然后对安巴里的实际设置
$ 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服务器,因为我从/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/ambari-server.log相同的错误。我怀疑ambari-server setup是通过本地主机连接的,这就是为什么我会得到同样的错误。
你能告诉我安巴里和/或Postgres的配置有什么问题吗?
发布于 2016-10-04 10:06:31
问题在于您的pg_hba.conf文件。
它从上到下进行解析,并使用第一条匹配线。
在您的例子中,选择的行是
host all all 127.0.0.1/32 ident(你似乎从本地主机连接)这不是你想要的。
要么删除该行,要么将其移到文件的末尾。
https://stackoverflow.com/questions/39849370
复制相似问题