Re: Unable to connect to Postgres13 server from psql client built on master

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: sirisha chamarthi <sirichamarthi22(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Unable to connect to Postgres13 server from psql client built on master
Date: 2022-04-12 08:15:57
Message-ID: YlU1PfTjWj/ku3v5@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Apr 12, 2022 at 12:47:54AM -0700, sirisha chamarthi wrote:
>
> I am unable to connect to my Postgres server (version 13 running) in Azure
> Postgres from the PSQL client built on the latest master. However, I am
> able to connect to the Postgres 15 server running locally on the machine. I
> installed an earlier version of the PSQL client (v 12) and was able to
> connect to both the Azure PG instance as well as the local instance. Can
> this be a bug in the master? I tried looking at the server logs in Azure
> but couldn't get anything meaningful from those. Any tips on how I can
> debug psql client further?
>
> root(at)userspgdev:/usr/local/pgsql# psql -U postgres -h
> inst.postgres.database.azure.com -d postgres
> Password for user postgres:
> psql (12.9 (Ubuntu 12.9-0ubuntu0.20.04.1), server 13.6)
> WARNING: psql major version 12, server major version 13.
> Some psql features might not work.
> SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits:
> 256, compression: off)
> Type "help" for help.
>
> postgres=> \q
>
> bin/psql -U postgres -h inst.postgres.database.azure.com -d postgres
> psql: error: connection to server at "inst.postgres.database.azure.com"
> (20.116.167.xx), port 5432 failed: FATAL: no pg_hba.conf entry for host
> "20.125.61.xx", user "postgres", database "postgres", SSL off

It's hard to be sure without the pg_hba.conf file, but the most likely
explanation is that your remote server only accept connection with SSL and you
haven't built your local binaries with SSL support.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2022-04-12 08:19:07 Re: random() function documentation
Previous Message Peter Smith 2022-04-12 07:50:52 Re: PG DOCS - logical replication filtering