Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Oct 2020 10:32:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 250068] databases/postgres12-server: psql: error: could not connect to server: server closed the connection unexpectedly
Message-ID:  <bug-250068-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250068

            Bug ID: 250068
           Summary: databases/postgres12-server: psql: error: could not
                    connect to server: server closed the connection
                    unexpectedly
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: ohartmann@walstatt.org

Running databases/postgresql12on a recent CURRENT (at the moment FreeBSD
13.0-CURRENT #50 r366364: Fri Oct  2 17:51:18 CEST 2020 amd64). The problem
persists a couple of months for now, last checked in March 2020. OS and por=
ts
are updated on a regular basis.

Host is running dual stack IPv4 and IPv6.

We switched password encryption from md5 to scram-sha-256 and I believe sin=
ce
then the mysterious problems occured, not sure. But I'll proceed and explai=
n.

postgresql.conf has been adapted as well via "password_encryption =3D
scram-sha-256". Passwords in question have been changed within databases
accordingly, especially the passowrd for database superuser "postgres".

pg_hba.conf has been adapted accordingly as well:

local  all postgres scram-sha-256|trust # alternative for tests

host    all   postgres  127.0.0.1/32   scram-sha-256
host    all   postgres  ::1/128       scram-sha-256

The server is listening on all addresses, checked via sockstat.

Trying to login on any database with the owner of the database or even post=
gres
results in:

psql -U postgres -d postgres -h localhost -W (or IP of the host, even 127.0=
.0.1
or ::1)=20

Result:
psql: error: could not connect to server: server closed the connection
unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Login omitting -h localhost (or IP) is all right. Login via any on-host cli=
ent
authenticating locally fails. Login via remote session from another host us=
ing
psql client also results in a fail.

There are other users accessing databases and authentication via LDAP
(OpenLDAP). This works from the local host as well from remote hosts.

Looking at log protocolls revela nothing. The failed logins seeme to bee se=
en
by the server, the server logs aline like

LOG:  connection received: host=3Dlocalhost port=3D37906

Then nothing and after a while I receive the error=20

psql: error: could not connect to server: server closed the connection
unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.


This might be a bug.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250068-7788>