pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15508: Not able to connect irrespective of valid entries in pg_hba.conf
4+ messages / 4 participants
[nested] [flat]

* BUG #15508: Not able to connect irrespective of valid entries in pg_hba.conf
@ 2018-11-15 07:03  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: PG Bug reporting form @ 2018-11-15 07:03 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: yogesh.jadhav@gmail.com

The following bug has been logged on the website:

Bug reference:      15508
Logged by:          Yogesh Jadhav
Email address:      yogesh.jadhav@gmail.com
PostgreSQL version: 11.1
Operating system:   Windows 10
Description:        

I am trying to connect a Postgres database which resides in a docker
installed on Ubuntu virtual machine. Following exception is being thrown on
the console.

    org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host
"10.1.X.X", user "usrXXX", database "dbXXX", SSL off

After going through various posts, I realised that I have to update
pg_hba.conf file. I have modified the file to include the following
settings.

   host dbXXX usrXXX 10.1.X.X/32 trust

*(Note I tried with md5 as well.)*

I verified the postgres database settings through `psql` and executed
commands as specified in this
post(https://dba.stackexchange.com/questions/161104/pgadmin-postgresql-no-pg-hba-conf-entry-for-host).
This verified that I am editing correct file. To take a step further, I also
verified the entry through pgAdmin (*pgAdmin is installed locally on
postgres host*) and found the following query is returning records as
entered in pg_hba.conf

    table pg_hba_file_rules;

You can get the images about infrastructure and pgAdmin query results at
following URL.

https://dba.stackexchange.com/questions/222602/not-able-to-connect-to-postgre-database-no-pg-hba-con...



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #15508: Not able to connect irrespective of valid entries in pg_hba.conf
@ 2018-11-15 07:08  David G. Johnston <david.g.johnston@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: David G. Johnston @ 2018-11-15 07:08 UTC (permalink / raw)
  To: yogesh.jadhav@gmail.com <yogesh.jadhav@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Thursday, November 15, 2018, PG Bug reporting form <
noreply@postgresql.org> wrote:
>
> After going through various posts, I realised that I have to update
> pg_hba.conf file. I have modified the file to include the following
> settings.
>
>    host dbXXX usrXXX 10.1.X.X/32 trust
>
> and found the following query is returning records as
> entered in pg_hba.conf
>
>     table pg_hba_file_rules;
>

Did you reload/restart the server after making the changes?  That file is
cached during startup.

David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #15508: Not able to connect irrespective of valid entries in pg_hba.conf
@ 2018-11-15 07:15  Yogesh <yogesh.jadhav@gmail.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Yogesh @ 2018-11-15 07:15 UTC (permalink / raw)
  To: david.g.johnston@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

Thanks for your response, David. I did restart postgres server (in fact
more than 10 times).

-- 
Regards
Yogesh Jadhav

On Thu, Nov 15, 2018 at 12:38 PM David G. Johnston <
david.g.johnston@gmail.com> wrote:

> On Thursday, November 15, 2018, PG Bug reporting form <
> noreply@postgresql.org> wrote:
>>
>> After going through various posts, I realised that I have to update
>> pg_hba.conf file. I have modified the file to include the following
>> settings.
>>
>>    host dbXXX usrXXX 10.1.X.X/32 trust
>>
>> and found the following query is returning records as
>> entered in pg_hba.conf
>>
>>     table pg_hba_file_rules;
>>
>
> Did you reload/restart the server after making the changes?  That file is
> cached during startup.
>
> David J.
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #15508: Not able to connect irrespective of valid entries in pg_hba.conf
@ 2018-11-15 14:41  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Yogesh <yogesh.jadhav@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2018-11-15 14:41 UTC (permalink / raw)
  To: Yogesh <yogesh.jadhav@gmail.com>; +Cc: david.g.johnston@gmail.com; pgsql-bugs@lists.postgresql.org

Yogesh <yogesh.jadhav@gmail.com> writes:
> Thanks for your response, David. I did restart postgres server (in fact
> more than 10 times).

Well, the three possibilities are (1) you edited the wrong file, (2) you
did not restart/reload the server, and (3) you put the wrong info into
the file.  We seem to have eliminated (1) and (2) so that leaves (3).
What is the pg_hba.conf entry that you are expecting to match this
connection request?

You may have to show us the un-obfuscated server error message, too,
if you want an accurate diagnosis of why it's not matching the connection.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2018-11-15 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 07:03 BUG #15508: Not able to connect irrespective of valid entries in pg_hba.conf PG Bug reporting form <noreply@postgresql.org>
2018-11-15 07:08 ` David G. Johnston <david.g.johnston@gmail.com>
2018-11-15 07:15   ` Yogesh <yogesh.jadhav@gmail.com>
2018-11-15 14:41     ` Tom Lane <tgl@sss.pgh.pa.us>

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