[pgpool-general: 8907] Re: pgpool forwarding database users/passwords

Bo Peng pengbo at sraoss.co.jp
Thu Aug 3 16:27:34 JST 2023


Hi,

Thank you for your reply.

> $ cat /opt/bitnami/pgpool/conf/pool_hba.conf
> host all all 192.162.122.0/24 password
> local    all             all                            trust
> host     all             replica       all         trust
> host     all             postgres       all         scram-sha-256
> host     all             wide               all         trust
> host     all             pop_user           all         trust
> host     all             all                all         scram-sha-256

I think one possible reason is that the client IP address doesn't match 192.162.122.0/24.

If the client doesn't match any entry, pgpool will return an error like:

  DETAIL:  no pool_hba.conf entry for host "...", user "postgres"..., database "..."

However, as you mentioned the connection failed with an error:

  DETAIL:  pool_passwd file does not contain an entry for ...


I guess your application matched the last entry "host  all  all   all  scram-sha-256".
In this case, pgpool will try to read password from pool_passwd file.

If it is possible, could you try to change the setting to "host all all all password"?
In this case, if your application can successfully connect to pgpool-II,
it can be determined that your application does not match 192.162.122.0/24.

On Wed, 2 Aug 2023 13:30:08 +0200
Tan Mientras <tanimientras at gmail.com> wrote:

> pgadmin also fails to connect to other database than postgres/postgres (?)
> 
> On Wed, Aug 2, 2023 at 12:43 PM Tan Mientras <tanimientras at gmail.com> wrote:
> 
> > $ cat /opt/bitnami/pgpool/conf/pool_hba.conf
> > host all all 192.162.122.0/24 password
> > local    all             all                            trust
> > host     all             replica       all         trust
> > host     all             postgres       all         scram-sha-256
> > host     all             wide               all         trust
> > host     all             pop_user           all         trust
> > host     all             all                all         scram-sha-256
> >
> >
> > On Wed, Aug 2, 2023 at 12:40 PM Tan Mientras <tanimientras at gmail.com>
> > wrote:
> >
> >>
> >> Did you get the error when your application connects to pgpool or
> >>> when you connect to pgpool using psql?
> >>>
> >> when the application (drupal site/php) connects to db.
> >>
> >>
> >>
> >>> As you mentioned you are using bitnami docker image.
> >>> Sorry, I am not familiar with bitnami docker image.
> >>> Please make sure the setting was updated.
> >>>
> >>
> >>
> >> $ grep enable_pool_hba /opt/bitnami/pgpool/conf/pgpool.conf
> >> enable_pool_hba = 'on'
> >>
> >>


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/



More information about the pgpool-general mailing list