From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Atul Kumar <akumar14871@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: strange behavior of pg_hba.conf file
Date: Wed, 22 Nov 2023 08:25:23 -0800
Message-ID: <947a953a-e2ab-497e-9381-6abaf0796560@aklaver.com> (raw)
In-Reply-To: <CA+ONtZ7nMGfC23Gpgq7x9YtuP3YpqwXDQZNK6NdLTFn7e2fhrw@mail.gmail.com>
References: <CA+ONtZ7nMGfC23Gpgq7x9YtuP3YpqwXDQZNK6NdLTFn7e2fhrw@mail.gmail.com>
On 11/22/23 08:21, Atul Kumar wrote:
> Hi,
>
> I have postgres 12 running in centos 7, recently I changed the
> authentication of entries of pg_hba.conf to scram-sh-256 for localhost.
>
> Since then I have started getting the below error:
>
> no pg_hba.conf entry for host "::1", user "postgres", database "postgres
The host is ::1 which IPv6 and your pg_hba.conf entry below is for IPv4.
You need to add IPv6 line.
>
>
>
>
> The entry of pg_hba.conf is like below:
>
> # TYPE DATABASE USER ADDRESS METHOD
>
> # "local" is for Unix domain socket connections only
>
> local all all scram-sha-256
>
> # IPv4 local connections:
>
> host all postgres 127.0.0.1/32 <http://127.0.0.1/32; scram-sha-256
>
>
>
> What I am missing here, please suggest.
>
>
>
>
> Regards,
>
> Atul
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, akumar14871@gmail.com
Subject: Re: strange behavior of pg_hba.conf file
In-Reply-To: <947a953a-e2ab-497e-9381-6abaf0796560@aklaver.com>
References: <CA+ONtZ7nMGfC23Gpgq7x9YtuP3YpqwXDQZNK6NdLTFn7e2fhrw@mail.gmail.com> <947a953a-e2ab-497e-9381-6abaf0796560@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox