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 1kppJp-0005DN-Iv for pgsql-general@arkaria.postgresql.org; Thu, 17 Dec 2020 09:11:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kppJo-0001nl-Gi for pgsql-general@arkaria.postgresql.org; Thu, 17 Dec 2020 09:11:28 +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 1kppJo-0001nW-5J for pgsql-general@lists.postgresql.org; Thu, 17 Dec 2020 09:11:28 +0000 Received: from smtpout1.smhi.se ([2001:67c:274:5501::30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kppJg-0001kR-3m for pgsql-general@postgresql.org; Thu, 17 Dec 2020 09:11:26 +0000 Received: from winserv744.ad.smhi.se (winserv744.ad.smhi.se [172.16.6.35]) by smtpout1.smhi.se (Postfix) with ESMTPS id BC72A10950B9; Thu, 17 Dec 2020 09:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smhi.se; s=20180112; t=1608196273; bh=4Jca8NRPCZy0CGx3Ap3BdrblslOadn6/emcrasjE9uQ=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=d1xZDjb7+CsLadIjXqWNsXWy08m1JSPPkbFfQV/Ge1f4bDdONlCMgv1yEbKreeoul V902QcHOjYMsYlGghHTSmRPOe/cWr8I6c0zPftq8hWFn38omizW3L3OB09yJEhOp9+ zb7SO4LlsZoLPTYLGa1jS6FwZj2TSO14OIwFg58o= Received: from winserv744.ad.smhi.se (172.16.6.35) by winserv744.ad.smhi.se (172.16.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 17 Dec 2020 10:11:13 +0100 Received: from winserv744.ad.smhi.se ([fe80::c19c:d0f0:5830:a72b]) by winserv744.ad.smhi.se ([fe80::c19c:d0f0:5830:a72b%9]) with mapi id 15.01.2106.006; Thu, 17 Dec 2020 10:11:13 +0100 From: Gustavsson Mikael To: Kyotaro Horiguchi CC: "pgsql-general@postgresql.org" , "Svensson Peter" Subject: SV: Problem with ssl and psql in Postgresql 13 Thread-Topic: Problem with ssl and psql in Postgresql 13 Thread-Index: AQHW1ER+dWnFD/e9/0CWjk1hYinUxan65DcAgAAT2wc= Date: Thu, 17 Dec 2020 09:11:13 +0000 Message-ID: <06191eae74d045e192a786a84a73ba53@smhi.se> References: ,<20201217.172938.170511532557914014.horikyota.ntt@gmail.com> In-Reply-To: <20201217.172938.170511532557914014.horikyota.ntt@gmail.com> Accept-Language: sv-SE, en-US Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.122.0.145] Content-Type: multipart/alternative; boundary="_000_06191eae74d045e192a786a84a73ba53smhise_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_06191eae74d045e192a786a84a73ba53smhise_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, SSL is on. grep ssl /etc/postgresql/13/postgresql.conf ssl =3D 'on' ssl_cert_file =3D '/etc/pki/private/xxx_incl_key.pem' ssl_key_file =3D '/etc/pki/private/xxx.key' Clarification, its the same postgresql13 server. I just connect with differ= ent psql-clients. KR ________________________________ Fr=E5n: Kyotaro Horiguchi Skickat: den 17 december 2020 09:29:38 Till: Gustavsson Mikael Kopia: pgsql-general@postgresql.org; Svensson Peter =C4mne: Re: Problem with ssl and psql in Postgresql 13 Hi. At Thu, 17 Dec 2020 07:21:08 +0000, Gustavsson Mikael wrote in > But not from psql 13: > $ /usr/pgsql-13/bin/psql -d postgres -Ukalle -hserver -W > Password: > psql: error: FATAL: no pg_hba.conf entry for host "nnn.nn.n.nnn", user "= kalle", database "postgres", SSL off > FATAL: no pg_hba.conf entry for host "nnn.nn.n.nnn", user "kalle", datab= ase "postgres", SSL off It looks like the option "ssl" (in postgresql.conf) is turned off on the v13 server. You will find lines like the following in the server log in that case. LOG: hostssl record cannot match because SSL is disabled HINT: Set ssl =3D on in postgresql.conf. regards. -- Kyotaro Horiguchi NTT Open Source Software Center --_000_06191eae74d045e192a786a84a73ba53smhise_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


Hi,


SSL is on. 


grep ssl /etc/postgresql/13/postgresql.conf  
ssl =3D 'on'
ssl_cert_file =3D '/etc/pki/private/xxx_incl_key.pem'
ssl_key_file =3D '/etc/pki/private/xxx.key'


Clarification, its the same postgresql13 server. I just connect with different psql-clients.


KR



Fr=E5n: Kyotaro Horiguchi= <horikyota.ntt@gmail.com>
Skickat: den 17 december 2020 09:29:38
Till: Gustavsson Mikael
Kopia: pgsql-general@postgresql.org; Svensson Peter
=C4mne: Re: Problem with ssl and psql in Postgresql 13
 
Hi.

At Thu, 17 Dec 2020 07:21:08 +0000, Gustavsson Mikael <mikael.gustav= sson@smhi.se> wrote in
> But not from psql 13:
> $ /usr/pgsql-13/bin/psql -d postgres -Ukalle -hserver -W
> Password:
> psql: error: FATAL:  no pg_hba.conf entry for host "nnn.nn.n= .nnn", user "kalle", database "postgres", SSL off<= br> > FATAL:  no pg_hba.conf entry for host "nnn.nn.n.nnn", u= ser "kalle", database "postgres", SSL off

It looks like the option "ssl" (in postgresql.conf) is turned off= on
the v13 server.  You will find lines like the following in the server<= br> log in that case.

LOG:  hostssl record cannot match because SSL is disabled
HINT:  Set ssl =3D on in postgresql.conf.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center
--_000_06191eae74d045e192a786a84a73ba53smhise_--