barman icon indicating copy to clipboard operation
barman copied to clipboard

pgreceivewal SubProcess immediately exits

Open lasteris opened this issue 6 months ago • 0 comments

Here is my setup: Postgresql 15 Barman configured as:

/etc/barman.d/backup.conf

[backup]
description = "Barman streaming replication"
streaming_archiver = true
backup_method = postgres
streaming_conninfo = host=10.36.0.126 port=5432 user=streaming_barman password=... client_encoding=utf8 dbname=postgres
slot_name = barman
create_slot = auto
conninfo = host=10.36.0.126 port=5432 user=barman password=... client_encoding=utf8 dbname=postgres

barman check backup looks like:

Server backup:
        PostgreSQL: OK
        superuser or standard user with backup privileges: OK
        PostgreSQL streaming: OK
        wal_level: OK
        replication slot: FAILED (slot 'barman' not active: is 'receive-wal' running?)
        .....
        receive-wal running: FAILED (See the Barman log file for more details)
        ....
        archiver errors: OK

log output:

2025-06-19 21:19:03,267 [71640] barman.command_wrappers DEBUG: BarmanSubProcess: ['/opt/barmen/.venv/bin/python3', '/opt/barmen/.venv/bin/barman', '-c', '/etc/barman.conf', '-q', 'receive-wal', 'backup']
2025-06-19 21:19:03,284 [71640] barman.command_wrappers DEBUG: BarmanSubProcess: subprocess started. pid: 71646
2025-06-19 21:19:03,285 [71640] barman.utils INFO: Cleaning up lockfiles directory.
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: deleting /opt/barmen/.backup-cron.lock
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: /opt/barmen/.backup-cron.lock deleted
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: deleting /opt/barmen/.backup-archive-wal.lock
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: /opt/barmen/.backup-archive-wal.lock deleted
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: deleting /opt/barmen/.backup-receive-wal.lock
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: /opt/barmen/.backup-receive-wal.lock deleted
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: deleting /opt/barmen/.config-update.lock
2025-06-19 21:19:03,286 [71640] barman.utils DEBUG: /opt/barmen/.config-update.lock deleted

don't hesitate about the barmen's path. that's a virtual python environment, because we can't update the system python interpreter, so we installed the barman via uv package manager. Also, due to custom installation, we defined the crontab task manually: * * * * * barman cron

Except that, we followed the Quick started section to configure the barman and Postgresql.

If we run manually barman receive-wal --force backup - it's working, but blocks terminal, as not run in background.

so the question is. why or who stops the pgreceivewal SubProcess and how we can investigate the reason ?

lasteris avatar Jun 20 '25 05:06 lasteris