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

From: sirisha chamarthi <sirichamarthi22(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Unable to connect to Postgres13 server from psql client built on master
Date: 2022-04-12 07:47:54
Message-ID: CAKrAKeVzZfs=MGQX1h+TyP_4HeRtbZQDvuOL5dBZoN=RouRFrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers.

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?

My local server is running with trust authentication and the remote server
is running with md5 in the pg_hba.conf. I am not sure if this changes the
psql behavior somehow.

root(at)userspgdev:/usr/local/pgsql# ./psql -U postgres -h
inst.postgres.database.azure.com -d postgres
bash: ./psql: No such file or directory
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

Also, wondering why no error is emitted by the psql client when the
connection attempt fails?

Thanks,
Sirisha

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-04-12 07:50:52 Re: PG DOCS - logical replication filtering
Previous Message Alvaro Herrera 2022-04-12 07:47:47 Re: MERGE bug report