Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5Z3S-00072Y-Nb for pgsql-admin@arkaria.postgresql.org; Mon, 09 Apr 2018 15:50:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5Z3R-0007Iz-MS for pgsql-admin@arkaria.postgresql.org; Mon, 09 Apr 2018 15:50:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5Z3R-0007Id-BP for pgsql-admin@lists.postgresql.org; Mon, 09 Apr 2018 15:50:01 +0000 Received: from mta04.3.doruk.net.tr ([81.21.172.142] helo=mta04.doruk.net.tr) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5Z3N-00033E-OE for pgsql-admin@postgresql.org; Mon, 09 Apr 2018 15:50:00 +0000 Received: from cmail19.webkontrol.doruk.net.tr ([212.58.6.99]) by mta04.doruk.net.tr with esmtp (Exim 4.86) (envelope-from ) id 1f5Z1J-000Auy-IL for pgsql-admin@postgresql.org; Mon, 09 Apr 2018 18:47:49 +0300 Received: from DESKTOPM80CG12 ([94.120.10.247]) by cmail19.webkontrol.doruk.net.tr (IceWarp 11.1.2.0) with ASMTP id 201804091849555474 for ; Mon, 09 Apr 2018 18:49:55 +0300 From: =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= To: Subject: SSL error: decryption failed or bad mac Date: Mon, 9 Apr 2018 18:49:48 +0300 Message-ID: <000001d3d01a$645d4e80$2d17eb80$@1nar.com.tr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdPQGdbYW9TKRHERT7ezhAcdCKUGTg== Content-Language: tr List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, Using PostgreSQL 9.6.7 on x86_64-pc-linux-gnu. OS is a Debian 4.9.82-1+deb9u3 (2018-03-02), libpq5 (9.6.7), openssl stable 1.1.0f. = System is a virtual server (VPS) in the cloud. Below is my pg_hba.conf file: local all postgres peer # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 # Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres peer #host replication postgres 127.0.0.1/32 md5 #host replication postgres ::1/128 md5 hostssl all all 0.0.0.0/0 md5 clientcert=3D1 Recently one of my users told me that they are receiving some error from system. I have my own daemon application running on that server. Accepting http requests. Parsing them doing some select on one database and inserting = into another database. Select is a single row, insert is a single row for the problem below. Below error message is for the database that I insert = records into. I have following log lines about mentioned error: 2018-04-09 09:17:01.971 +03 [608] mutabakat@mutabakat LOG: SSL error: decryption failed or bad record mac 2018-04-09 09:17:01.971 +03 [608] mutabakat@mutabakat LOG: could not receive data from client: Ba=F0lant=FD kar=FE=FDdan kesildi 2018-04-09 09:17:01.971 +03 [608] mutabakat@mutabakat LOG: = disconnection: session time: 237:25:58.027 user=3Dmutabakat database=3Dmutabakat = host=3D::1 port=3D34670 My application is running on the same computer as PostgreSQL database server. It is using a single connection to the database over pqsql = driver, each http request is handled in a new thread using that single = connection. Application is online for about 2-3 months. So far, I did not have any problems. Until I have above call and log lines. I normally do not need = any ssl connection to server. However, it is libpq5 which choose to do that. = I think it is possible to make a no-ssl connection with above pg_hba.conf = (not completely sure though). - I do not know what that error actually mean. I would like to learn = details of it as well as possible solution suggestion(s), please. - I also would like to have help to convert my connection to a plain connection as there is no need for SSL connection for an application = running on the same machine. Any help is appreciated. Thanks & regards, Ertan K=FC=E7=FCko=F0lu