"pg_receivewal not present in $PATH"

94 views
Skip to first unread message

dulh...@mailbox.org

unread,
Jan 11, 2022, 3:26:15 AMJan 11
to pgba...@googlegroups.com
I am getting this error on in the barman logs even though

barman@barman_server.intern:~> which pg_receivewal
/opt/db/postgres/postgresql/bin/pg_receivewal

this is a barman check server_name output

:~> barman check vm-51150-0196
Server vm-51150-0196:
PostgreSQL: OK
superuser or standard user with backup privileges: OK
PostgreSQL streaming: OK
wal_level: OK
replication slot: FAILED (slot 'barman' not initialised: is 'receive-wal' running?)
directories: OK
retention policy settings: OK
backup maximum age: OK (no last_backup_maximum_age provided)
backup minimum size: OK (100.2 MiB)
wal maximum age: OK (no last_wal_maximum_age provided)
wal size: OK (32.2 KiB)
compression settings: OK
failed backups: OK (there are 0 failed backups)
minimum redundancy requirements: OK (have 7 backups, expected at least 0)
pg_basebackup: OK
pg_basebackup compatible: OK
pg_basebackup supports tablespaces mapping: OK
systemid coherence: OK
pg_receivexlog: OK
pg_receivexlog compatible: OK
receive-wal running: FAILED (See the Barman log file for more details)
archiver errors: OK

another symptom

~> barman receive-wal vm-51150-0196
Starting receive-wal for server vm-51150-0196
vm-51150-0196: pg_receivewal: starting log streaming at 0/AF000000 (timeline 2)
vm-51150-0196: pg_receivewal: error: could not send replication command "START_REPLICATION":
vm-51150-0196: pg_receivewal: error: disconnected
ERROR: ArchiverFailure:pg_receivewal terminated with error code: 1
You have new mail in /var/mail/barman

Luca Ferrari

unread,
Jan 11, 2022, 3:52:21 AMJan 11
to Barman, Backup and Recovery Manager for PostgreSQL
The email subject referes to an error you don't place into your email content.
Assuming there is a problem with your binaries installation path, you
should use path_prefix into your configuration file.

Luca
> --
> --
> You received this message because you are subscribed to the "Barman for PostgreSQL" group.
> To post to this group, send email to pgba...@googlegroups.com
> To unsubscribe from this group, send email to
> pgbarman+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/pgbarman?hl=en?hl=en-GB
>
> ---
> You received this message because you are subscribed to the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pgbarman+u...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/pgbarman/1101924765.1458216.1641889570050%40office.mailbox.org.

dulh...@mailbox.org

unread,
Jan 11, 2022, 4:03:32 AMJan 11
to pgba...@googlegroups.com

On 01/11/2022 9:51 AM Luca Ferrari <fluc...@gmail.com> wrote:


The email subject refers to an error you don't place into your email content.
sorry, I mean the error in the subject line, yes

Assuming there is a problem with your binaries installation path, you should use path_prefix into your configuration file.
hm
  • I can not see any problem with the binary installation path. which pg_receivewal finds it. Also it has worked yesterday and some hours ago.
barman@vm-51150-0188:~> which pg_receivewal
/opt/db/postgres/postgresql/bin/pg_receivewal
  • which configuration file do you refer to? barman, postgres on the barman server, postgres on the postgres-server ...?
  • path_prefx would be everything prior the actual binary? my pg_receivewal lives at  /opt/db/postgres/postgresql/bin/pg_receivewal, so the prefix would be /opt/db/postgres/postgresql/bin/ then ?

Luca Ferrari

unread,
Jan 11, 2022, 5:15:52 AMJan 11
to Barman, Backup and Recovery Manager for PostgreSQL
On Tue, Jan 11, 2022 at 10:03 AM dulhaver via Barman, Backup and
Recovery Manager for PostgreSQL <pgba...@googlegroups.com> wrote:
>
> I can not see any problem with the binary installation path. which pg_receivewal finds it. Also it has worked yesterday and some hours ago.

It goes like this: you are testing pg_receivewal as a regular user,
but barman is using another user (e.g., barman). The latter does not
find anymore the program.
Therefore, either add it to the barman specific user's PATH, or edit
barman.conf and add path_prefix = /opt/postgres/bin.

Luca
Reply all
Reply to author
Forward
0 new messages