RE: issues connecting to RDS from psql 9.2 v 14.2

From: "Capobianco, Tony" <Tony(dot)Capobianco(at)bcbsma(dot)com>
To: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: RE: issues connecting to RDS from psql 9.2 v 14.2
Date: 2022-04-28 17:49:11
Message-ID: BLAPR13MB46603FB1F11ED81FE66897619EFD9@BLAPR13MB4660.namprd13.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Bingo! That was it. Thanks so much!

Tony

From: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
Sent: Wednesday, April 27, 2022 5:19 PM
To: Capobianco, Tony <Tony(dot)Capobianco(at)bcbsma(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>; pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: issues connecting to RDS from psql 9.2 v 14.2

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

On 27 Apr 2022, at 10:16 PM, Capobianco, Tony <Tony(dot)Capobianco(at)bcbsma(dot)com<mailto:Tony(dot)Capobianco(at)bcbsma(dot)com>> wrote:

Ok, that makes sense. Attempting the below, but receiving this error:

./configure --without-readline --with-includes=/usr/lib --with-openssl

checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL

You don't have crypto installed on your machine.

Try something like

Redhat / Centos / Fedora : sudo yum install openssl-devel
Ubuntu / Debian : sudo apt-get install libssl-dev

[postgres(at)servername postgresql-14.2]$ ls -lhrt /usr/lib/*crypt*
-rwxr-xr-x 1 root root 547K Feb 28 2017 /usr/lib/libgcrypt.so.11.8.2
lrwxrwxrwx 1 root root 19 Aug 29 2017 /usr/lib/libgcrypt.so.11 -> libgcrypt.so.11.8.2
-rwxr-xr-x 1 root root 38K Sep 14 2021 /usr/lib/libcrypt-2.17.so
lrwxrwxrwx 1 root root 16 Nov 12 07:01 /usr/lib/libcrypt.so.1 -> libcrypt-2.17.so
lrwxrwxrwx 1 root root 23 Nov 12 07:01 /usr/lib/libcrypt.so -> ../../lib/libcrypt.so.1

Tony

-----Original Message-----
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>
Sent: Wednesday, April 27, 2022 12:47 PM
To: Capobianco, Tony <Tony(dot)Capobianco(at)bcbsma(dot)com<mailto:Tony(dot)Capobianco(at)bcbsma(dot)com>>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org<mailto:pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: issues connecting to RDS from psql 9.2 v 14.2

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

"Capobianco, Tony" <Tony(dot)Capobianco(at)bcbsma(dot)com<mailto:Tony(dot)Capobianco(at)bcbsma(dot)com>> writes:

Our RHEL 7.9 installation comes with PostgreSQL 9.2 installed which I know has been desupported. We installed 14.2 in a non-default location and observe this unusual behavior:
[postgres(at)servername ~]$ psql -h RDS-instance.rds.amazonaws.com<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Frds-instance.rds.amazonaws.com%2F&data=05%7C01%7CTony.Capobianco%40bcbsma.com%7C4ecac4c7e6594ca9ecfe08da289395a9%7C7f6a7d1e1213434b981c95c72d65f665%7C0%7C0%7C637866911598404548%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VUtzhJfZOxqg2brhoa%2FabHw3UOnYYvpUaHR90RLsV%2BQ%3D&reserved=0> -p
5432 -d dbname -U root Password for user root:
psql (9.2.24, server 12.8)
WARNING: psql version 9.2, server version 12.0.
Some psql features might not work.
SSL connection (cipher: cipher text here, bits: 256) Type "help" for
help.

daldb=> \q
[postgres@ servername ~]$ export
LD_LIBRARY_PATH=/u01/apps/postgres/postgresql-14.2/pg14.2/usr/local/pg
sql/lib [postgres@ servername ~]$
/u01/apps/postgres/postgresql-14.2/pg14.2/usr/local/pgsql/bin/psql -h
RDS-instance.rds.amazonaws.com<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Frds-instance.rds.amazonaws.com%2F&data=05%7C01%7CTony.Capobianco%40bcbsma.com%7C4ecac4c7e6594ca9ecfe08da289395a9%7C7f6a7d1e1213434b981c95c72d65f665%7C0%7C0%7C637866911598404548%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VUtzhJfZOxqg2brhoa%2FabHw3UOnYYvpUaHR90RLsV%2BQ%3D&reserved=0> -p 5432 -d dbname -U root
psql: error: connection to server at " RDS-instance.rds.amazonaws.com<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Frds-instance.rds.amazonaws.com%2F&data=05%7C01%7CTony.Capobianco%40bcbsma.com%7C4ecac4c7e6594ca9ecfe08da289395a9%7C7f6a7d1e1213434b981c95c72d65f665%7C0%7C0%7C637866911598404548%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VUtzhJfZOxqg2brhoa%2FabHw3UOnYYvpUaHR90RLsV%2BQ%3D&reserved=0>
" (1.2.3.4), port 5432 failed: FATAL: no pg_hba.conf entry for
host "1.2.3.4", user "root", database "dbname", SSL off [postgres@
servername ~]$

Any ideas of why I'm encountering this issue?

Looks like you neglected to build psql with OpenSSL support, and the server is insisting on having an SSL connection.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tony Farrell 2022-04-28 19:53:16 stop
Previous Message linux.il 2022-04-28 17:46:50 Re: Weird GSSAPI error - trying to connect via SSH tunnel