Re: Connection not allowed because of an error 'Not in pg_hba.conf' - Mailing list pgsql-general

From Tom Lane
Subject Re: Connection not allowed because of an error 'Not in pg_hba.conf'
Date
Msg-id 228333.1695067341@sss.pgh.pa.us
Whole thread Raw
In response to Connection not allowed because of an error 'Not in pg_hba.conf'  ("Johnson, Bruce E - (bjohnson)" <Johnson@pharmacy.arizona.edu>)
List pgsql-general
"Johnson, Bruce E - (bjohnson)" <Johnson@pharmacy.arizona.edu> writes:
> The error I am getting on the client is:
>  password authentication failed for user "trav"
> connection to server at "dhbpostgres.pharmacy.arizona.edu" (10.128.206.109), port 5432 failed: FATAL:  no pg_hba.conf
entryfor host "10.128.206.109", user "trav", database "webdata", no encryption 

> But I do have an entry that should allow it:
> #Internal server mgmt range
> hostssl all all 10.128.206.0/23 password

I think what you are seeing here is two separate connection attempts.
libpq will try an SSL connection, and that one is seemingly failing
with a bad password.  Then it'll try a non-SSL connection, and that
one is getting rejected by the server because "hostssl" doesn't
permit it, leading to your second message (which clearly shows
that that connection wasn't ssl-encrypted).

You could adjust your connection parameters on the client side to
prevent the useless non-SSL connection attempt.  But of course the
real question is how come the password authentication failed in
the first attempt.  Looking into the server's log might yield
a clue.

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Connection not allowed because of an error 'Not in pg_hba.conf'
Next
From: Israel Brewster
Date:
Subject: Re: Connection not allowed because of an error 'Not in pg_hba.conf'