FATAL: no pg_hba.conf entry for host xxx, user xxx, database xxx when running gpcheckcat on some test
search cancel

FATAL: no pg_hba.conf entry for host xxx, user xxx, database xxx when running gpcheckcat on some test

book

Article ID: 296997

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

For some gpcheckcat test like "dependency" or "persistent", sometimes we will get error as below:
[gpadmin@mdw ~]$ gpcheckcat -p 5432 -R persistent
Truncated batch size to number of primaries: 3

Connected as user 'gpadmin' to database 'testdb', port '5432', gpdb version '5.16'
-------------------------------------------------------------------
Batch size: 3
Performing test 'persistent'
20200321:19:18:18:069110 gpcheckcat:mdw:gpadmin-[CRITICAL]:-could not connect to testdb: "FATAL:  no pg_hba.conf entry for host "172.16.76.162", user "gpadmin", database "testdb", SSL off"

However for some other test like "missing_extraneous" or "duplicate", it can proceed normally:
[gpadmin@mdw gpseg-1]$ gpcheckcat -p 5432 
Truncated batch size to number of primaries: 3

Connected as user 'gpadmin' to database 'testdb', port '5432', gpdb version '5.16'
-------------------------------------------------------------------
Batch size: 3
Performing test 'unique_index_violation'
Total runtime for test 'unique_index_violation': 0:00:02.05
Performing test 'duplicate'
Total runtime for test 'duplicate': 0:00:04.36
Performing test 'missing_extraneous'
Total runtime for test 'missing_extraneous': 0:00:06.09
From master pg_hba.conf, we can actually find the entry that was reported missing:
host     all         gpadmin         127.0.0.1/28    trust
host     all         gpadmin         172.16.76.162/32       trust
host     all         gpadmin         172.16.76.163/32       trust
host     all         gpadmin         172.16.76.165/32       trust


Environment

Product Version: 4.3.33

Resolution

This issue is caused by the missing entry in pg_hba.conf of all or one of the segments.

The solution is to make sure this entry to be added to all segments' pg_hba.conf and then reload configuration.