我使用GP 4.3.7.2,我跟着手動http://120.52.72.46/gpdb.docs.pivotal.io/c3pr90ntcsf0/gs/43/pdf/GPDB43xGettingStarted.pdf無法連接,錯誤消息Greenplum的:「沒有pg_hba.conf的條目」
我可以用管理員用戶連接到服務器,但是當我嘗試使用另一個用戶,我收到錯誤消息
psql: FATAL: no pg_hba.conf entry for host "[local]", user "gpuser", database "rdw", SSL off
我已經對stackoverflow做了一些研究。我修改了pg_hba.conf
,添加一個條目
host all all 0.0.0.0/0 md5
,然後重新裝入gpstop -u
和SELECT pg_reload_conf();
配置文件,甚至試圖重新啓動服務器GP。但我仍然得到同樣的錯誤。
我也試着像
host all all 127.0.0.1/32 md5
這並沒有工作過的其他條目。
請告訴我如何解決這個問題。
編輯:
我重新安裝在單節點模式數據庫,並嚴格遵循前面提到的手冊。我爲這兩個用戶創建了兩個用戶:user1,user2和授予角色users
。 我執行什麼: 在命令行:
$ createuser -P user1
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
在PSQL:
=# CREATE USER user2 WITH PASSWORD 'changeme' CREATEDB NOSUPERUSER;
=# CREATE ROLE users;
=# GRANT users TO user1, user2;
這是我整個的pg_hba.conf,它位於/data/gp/server/master/gpsne-1/pg_hba.conf
。我添加了最後3行。
local all hadoop ident
host all hadoop 127.0.0.1/28 trust
host all hadoop 10.10.10.32/32 trust
host all hadoop ::1/128 trust
host all hadoop fe80::d6ae:52ff:feb9:87c2/128 trust
local replication hadoop ident
host replication hadoop samenet trust
local tutorial +users md5
local tutorial +users 127.0.0.1/28 md5
hostssl tutorial +users samenet md5
但我仍然得到同樣的錯誤。
psql: FATAL: no pg_hba.conf entry for host "[local]", user "user1", database "tutorial", SSL off
當我安裝數據庫時,我收到一條警告消息,不知道它是否相關。
20160302:10:44:51:023434 gpinitsystem:bobcat04:hadoop-[WARN]:-Host 127.0.0.1 is assigned as localhost in /etc/hosts
20160302:10:44:51:023434 gpinitsystem:bobcat04:hadoop-[WARN]:-This will cause segment->master communication failures
20160302:10:44:51:023434 gpinitsystem:bobcat04:hadoop-[WARN]:-Remove 127.0.0.1 from local host line in /etc/hosts
您添加的條目似乎正確。問題一定在其他地方。也許你改了一個錯誤的'pg_hba.conf'文件,或者沒有重啓服務器。 – AlexM
「[local]」在Unix域套接字中?這需要「本地」而不是「主機」。 –
請發佈您的整個pg_hba.conf,但沒有評論。 –