Skip to content

PostgreSQL with SSL fails in strange ways #1965

@arogge

Description

@arogge

Bareos component version

bareos-dir 23.0.4
bareos-bconsole 23.0.4

Steps to reproduce

  1. install a new Ubuntu 20.04 system
  2. set up bareos-repository
  3. apt update && apt install postgresql bareos-director bareos-bconsole
  4. run a few concurrent jobs, wait for any one of them to fail with strange catalog errors and strange messages in the PostgreSQL log

Expected results

  • PostgreSQL with TLS enabled should work
  • Bareos should at least warn me that this will not work properly
  • a default installation on Ubuntu should not run into this issue

Actual results

  • as described above, jobs fail in strange ways
LOG:  SSL error: decryption failed or bad record mac
CONTEXT:  COPY batch, line 142906
STATEMENT:  COPY batch FROM STDIN
LOG:  could not receive data from client: Connection reset by peer
CONTEXT:  COPY batch, line 142906
STATEMENT:  COPY batch FROM STDIN
LOG:  incomplete message from client
CONTEXT:  COPY batch, line 142906
STATEMENT:  COPY batch FROM STDIN
ERROR:  unexpected EOF on client connection with an open transaction
CONTEXT:  COPY batch, line 142906
STATEMENT:  COPY batch FROM STDIN
LOG:  could not send data to client: Connection reset by peer
STATEMENT:  COPY batch FROM STDIN
FATAL:  terminating connection because protocol synchronization was lost 

Environment

- OS: ``
- component:

Relevant log output

No response

Relevant traces output

No response

Anything else?

Maybe related to
https://stackoverflow.com/questions/22752521/uwsgi-flask-sqlalchemy-and-postgres-ssl-error-decryption-failed-or-bad-reco according to this post this can happen when multiple threads/processes write to the database over the same connection

The problem is trigger when several jobs runs in parallel and large data are backup

Sub-issues

Metadata

Metadata

Assignees

Labels

bugThis addresses a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions