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 1lAgKb-00046Q-KK for pgsql-admin@arkaria.postgresql.org; Fri, 12 Feb 2021 21:50:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lAgKZ-0006nY-N1 for pgsql-admin@arkaria.postgresql.org; Fri, 12 Feb 2021 21:50:27 +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 1lAgKZ-0006nR-Eu for pgsql-admin@lists.postgresql.org; Fri, 12 Feb 2021 21:50:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lAgKX-0002TI-6e for pgsql-admin@postgresql.org; Fri, 12 Feb 2021 21:50:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 11CLoN3h1608035; Fri, 12 Feb 2021 16:50:23 -0500 From: Tom Lane To: jian xu cc: pgsql-admin Subject: Re: pg13 psql can't connect pg instance with ssl enabled after upgrading In-reply-to: References: Comments: In-reply-to jian xu message dated "Fri, 12 Feb 2021 21:16:23 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1608033.1613166623.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 12 Feb 2021 16:50:23 -0500 Message-ID: <1608034.1613166623@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk jian xu writes: > the instance didn't have ssl enabled, we upgraded it to pg13, then enabl= ed ssl, however when we try to login with pg13 psql 13, psql always try s= sl=3Doff to login > public_postgresql_13_1/bin/psql "sslmode=3Drequire host=3Dxxxxxx dbname=3D= postgres" > psql: error: FATAL: no pg_hba.conf entry for host "xxxxx", user "xxxx",= database "postgres", SSL off Are you entirely sure that that version of psql (or more accurately, the libpq it's linked to) was built with SSL support? If you are in an environment where GSS encryption is possible, it could also be that you're being bit by the recently-fixed bug that libpq didn't fall back from GSS to SSL encryption correctly [1]. That seems unlikely though, as both client and server would need to possess active Kerberos tickets. regards, tom lane [1] https://git.postgresql.org/gitweb/?p=3Dpostgresql.git&a=3Dcommitdiff&h= =3D06b844c2b