Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njp4H-00068z-3y for pgsql-admin@arkaria.postgresql.org; Wed, 27 Apr 2022 21:19:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1njp4F-0001Rv-Lq for pgsql-admin@arkaria.postgresql.org; Wed, 27 Apr 2022 21:19:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njp4F-0001Rl-16 for pgsql-admin@lists.postgresql.org; Wed, 27 Apr 2022 21:19:23 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1njp48-0006ZH-03 for pgsql-admin@lists.postgresql.org; Wed, 27 Apr 2022 21:19:22 +0000 Received: by mail-ed1-x536.google.com with SMTP id d6so3375704ede.8 for ; Wed, 27 Apr 2022 14:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=0Zu0st4hIGo0rtRKWZqcX80UqEA/4R82hkR+s66GbtU=; b=ngAaQnCjMPyvDgXGoc2yReyq5zcWYXY9dsU1te3X5zTwQwMK6lIIQ66u7PBbR10SrW qo/2CW0N7EX5SIVOe5X1TFTXMZDcKQWjMxgZDvlYJ+hBHpNvVaEhdxWf0qBWucHk8VnU uxLv08v+Y9+ckomOdnLfOvXIntpg+l3AZxvn8hBmR6wqhQRJCqrP7V/JnyDoyCgeUMg4 q/vWfzA3G7rqbOU2y1MmVS8MN+ld4Ej+jDC9h4SxrS6C6kCUH/Fk2gWNW17BeSgmgk10 QVKm6ERqYNhSQkBACYiQNhxqj4sF4RgRZY5Letipes+U1AYC2ADJonBgl7hcGpJUpuVI A0/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=0Zu0st4hIGo0rtRKWZqcX80UqEA/4R82hkR+s66GbtU=; b=rV24L2TsZtm9XJL2d9VZ6Kd1OyyXreE1slm2aRpW980DeFyRsibjKnX5rh5Bf2ujlk qfJBHS5X1lL3KJC4CmeEXhyQkVA3kjOUAJdRdhIkrmn/8WsIoZ7ESLOhnFOnoFrq3lSa CbJ5vzrgyvHXBD6zh+qdRxB0Azm9C0hvIVauJxqNFNR6D/CQkOh1UBaixZGTu7VWVW+Z bsegfQI2Dlv0v7CHS6B2Ft3GqGWvz2IXjFjiFoNgPT2We9nNep/73Zqoggr28S3PuQJk BqijFV9rXzZ4bk66N4KxHFq7iGuUhAdFL50TuUS1Z+TW5FgyyP2Z7KciNsQEIwaPummi HS+w== X-Gm-Message-State: AOAM530JEqK0d7La2lSWoYdOQzX2ocXV9CC+hswNRC5htKP/ilkuVucB 0Cy8YTA9+ZjPvTU6WXYaAzI= X-Google-Smtp-Source: ABdhPJwuu5TMjKXYfS4uD7cHtAkGuhZcLbxup2JNQUf0OA7ojmFoKruXWJLhcxE0woNsTSswOcmASQ== X-Received: by 2002:a05:6402:1450:b0:425:e43f:7ccd with SMTP id d16-20020a056402145000b00425e43f7ccdmr19727602edx.299.1651094354205; Wed, 27 Apr 2022 14:19:14 -0700 (PDT) Received: from smtpclient.apple (46-170-21.adsl.cyta.gr. [46.103.170.21]) by smtp.gmail.com with ESMTPSA id ca19-20020aa7cd73000000b0042617ba63c3sm226816edb.77.2022.04.27.14.19.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Apr 2022 14:19:13 -0700 (PDT) From: Florents Tselai Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_0BC705A9-F5B9-4770-AD3C-E902AF6E99D5" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: issues connecting to RDS from psql 9.2 v 14.2 Date: Thu, 28 Apr 2022 00:19:10 +0300 In-Reply-To: Cc: Tom Lane , "pgsql-admin@lists.postgresql.org" To: "Capobianco, Tony" References: <395140.1651078037@sss.pgh.pa.us> X-Mailer: Apple Mail (2.3696.80.82.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_0BC705A9-F5B9-4770-AD3C-E902AF6E99D5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 27 Apr 2022, at 10:16 PM, Capobianco, Tony = wrote: >=20 > Ok, that makes sense. Attempting the below, but receiving this error: >=20 > ./configure --without-readline --with-includes=3D/usr/lib = --with-openssl >=20 > checking for CRYPTO_new_ex_data in -lcrypto... no > configure: error: library 'crypto' is required for OpenSSL You don=E2=80=99t have crypto installed on your machine. Try something like=20 Redhat / Centos / Fedora : sudo yum install openssl-devel=20 Ubuntu / Debian : sudo apt-get install libssl-dev >=20 > [postgres@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 >=20 > Tony=20 >=20 > -----Original Message----- > From: Tom Lane >=20 > Sent: Wednesday, April 27, 2022 12:47 PM > To: Capobianco, Tony > > Cc: pgsql-admin@lists.postgresql.org = > Subject: Re: issues connecting to RDS from psql 9.2 v 14.2 >=20 > 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. >=20 >=20 > "Capobianco, Tony" 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@servername ~]$ psql -h RDS-instance.rds.amazonaws.com -p=20 >> 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=20= >> help. >=20 >> daldb=3D> \q >> [postgres@ servername ~]$ export=20 >> = LD_LIBRARY_PATH=3D/u01/apps/postgres/postgresql-14.2/pg14.2/usr/local/pg >> sql/lib [postgres@ servername ~]$=20 >> /u01/apps/postgres/postgresql-14.2/pg14.2/usr/local/pgsql/bin/psql -h=20= >> RDS-instance.rds.amazonaws.com -p 5432 -d dbname -U root >> psql: error: connection to server at " RDS-instance.rds.amazonaws.com=20= >> " (1.2.3.4), port 5432 failed: FATAL: no pg_hba.conf entry for=20 >> host "1.2.3.4", user "root", database "dbname", SSL off [postgres@=20 >> servername ~]$ >=20 >> Any ideas of why I'm encountering this issue? >=20 > Looks like you neglected to build psql with OpenSSL support, and the = server is insisting on having an SSL connection. >=20 > regards, tom lane --Apple-Mail=_0BC705A9-F5B9-4770-AD3C-E902AF6E99D5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 27 Apr 2022, at 10:16 PM, Capobianco, Tony <Tony.Capobianco@bcbsma.com> wrote:

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

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

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

You = don=E2=80=99t 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@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@sss.pgh.pa.us> 
Sent: Wednesday, April 27, 2022 = 12:47 PM
To: = Capobianco, Tony <Tony.Capobianco@bcbsma.com>
Cc: pgsql-admin@lists.postgresql.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.Capobianco@bcbsma.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@servername ~]$ = psql -h RDS-instance.rds.amazonaws.com -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=3D> \q
[postgres@ servername ~]$ export 
LD_LIBRARY_PATH=3D/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/p= sql -h 
RDS-instance.rds.amazonaws.com -p 5432 -d dbname -U = root
psql: error: connection to server at " RDS-instance.rds.amazonaws.com 
" (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

= --Apple-Mail=_0BC705A9-F5B9-4770-AD3C-E902AF6E99D5--