pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Johnson, Bruce E - (bjohnson) <Johnson@pharmacy.arizona.edu>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Connection not allowed because of an error 'Not in pg_hba.conf'
Date: Mon, 18 Sep 2023 16:02:21 -0400
Message-ID: <228333.1695067341@sss.pgh.pa.us> (raw)
In-Reply-To: <65A32E9A-A82B-4968-9CE9-09C21AAE6CC0@arizona.edu>
References: <65A32E9A-A82B-4968-9CE9-09C21AAE6CC0@arizona.edu>

"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 entry for 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





view thread (9+ messages)  latest in thread

Message-ID: <228333.1695067341@sss.pgh.pa.us>
Permalink:  ../228333.1695067341@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/228333.1695067341@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, Johnson@pharmacy.arizona.edu
  Subject: Re: Connection not allowed because of an error 'Not in pg_hba.conf'
  In-Reply-To: <228333.1695067341@sss.pgh.pa.us>
  References: <65A32E9A-A82B-4968-9CE9-09C21AAE6CC0@arizona.edu> <228333.1695067341@sss.pgh.pa.us>

* 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