Barman check time out

643 views
Skip to first unread message

savita...@gmail.com

unread,
Feb 22, 2021, 12:35:44 PM2/22/21
to Barman, Backup and Recovery Manager for PostgreSQL
I am getting error 
barman@prod-usw2-cs-main-dbbackups:~$ barman check satdb_streaming
Server satdb_streaming:
WAL archive: FAILED (please make sure WAL shipping is setup)
check timeout: FAILED (barman check command timed out)


On the postgres server i have setup the archive_command as 

rsync -a %p barman@Barman-server-ip:/mnt/data/barman/satdb_streaming/incoming/%f

But i get error

 rsync: link_stat "/var/lib/postgresql/%p" failed: No such file or directory (2)
rsync: change_dir#3 "/mnt/data/barman/satdb_streaming/incoming" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(713) [Receiver=3.1.2]

considering my WAL files are not in /var/lib/postgresql , how can i reset the archive command where i can point the WAL directory 

Thanks
Savy

Luca Ferrari

unread,
Feb 23, 2021, 2:55:43 AM2/23/21
to Barman, Backup and Recovery Manager for PostgreSQL
On Mon, Feb 22, 2021 at 6:35 PM savita...@gmail.com
<savita...@gmail.com> wrote:
> rsync -a %p barman@Barman-server-ip:/mnt/data/barman/satdb_streaming/incoming/%f
>

There are multiple errors here:
- the barman remote directory does not seem to exist or is not
accessible to barman user;
- %p is expanded to the file name of the wal, and if the server does
not find it out I suspect you have some misconfiguration.

Are you sure you are running PostgreSQL with the correct cluster
PGDATA? Sounds to me there is a service you are running on the wrong
directory.
What is your PGDATA?
Also in the log you should have a line like "failing command was"
expanded to the full rsync command, can you show us?

Luca

Savita Pandey

unread,
Feb 24, 2021, 4:32:13 PM2/24/21
to pgba...@googlegroups.com
Hi Luca 

 Are you sure you are running PostgreSQL with the correct cluster
PGDATA? Sounds to me there is a service you are running on the wrong
directory. --- My data directory is in  

What is your PGDATA?
postgres=# show data_directory ;
data_directory
------------------------------
/mnt/data/postgresql/10/main
(1 row)postgres=# show config_file;
config_file
-----------------------------------------
/etc/postgresql/10/main/postgresql.conf
(1 row)

Also in the log you should have a line like "failing command was". -- Failing command 
barman.exceptions.LockFilePermissionDenied: /mnt/data/barman/.satdb_streaming-receive-wal.lock
2021-02-24 21:16:01,930 [16352] barman.server ERROR: Permission denied, unable to access '/mnt/data/barman/.db-cron.lock'
expanded to the full rsync command, can you show us?

barman@ip:~$ barman show-server satdb_streaming |grep incoming_wals_directory
incoming_wals_directory: /mnt/data/barman/satdb_streaming/incoming
barman@ip:~$ rsync -a %p bar...@10.1.1.13:/mnt/data/barman/satdb_streaming/incoming/%f
barman@postgres: Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
barman@ip:~$ barman check satdb_streaming

Server satdb_streaming:
WAL archive: FAILED (please make sure WAL shipping is setup)
	PostgreSQL: OK

--
--
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/CAKoxK%2B5ejLx6P1zuq5ZEe0QxedC4Zu1m5vuxAZV2KBPc39Hd7g%40mail.gmail.com.


--
Thanks
Savita Pandey
469537803 

savita...@gmail.com

unread,
Feb 24, 2021, 6:43:27 PM2/24/21
to Barman, Backup and Recovery Manager for PostgreSQL
I  am trying to set postgres path , as i am getting error

Starting receive-wal for server satdb_streaming

ERROR: ArchiverFailure:pg_receivexlog not present in $PATHBut cannot set as i am unable to find the path , i want to set somnething like this on backup box to fix above error.

i have to set something like this

barman@backup-server:~$ export PATH=$PATH:/usr/pgsql-10/bin/

on the saturn box i am unable to find path , i tried to serach for path using

postgres=# show config_file;

config_file

-----------------------------------------

/etc/postgresql/10/main/postgresql.conf

(1 row)postgres=# show data_directory ;

data_directory

------------------------------

/mnt/data/postgresql/10/main

(1 row)



I looked , 


locate pg_receivexlog

/usr/bin/pg_receivexlog 



I set the path 


But still getting error 


barman@backup-server:~$ locate pg_receivexlog

/usr/bin/pg_receivexlog

barman@backup-server:~$ export PATH=$PATH:/usr/bin/pg_receivexlog

barman@backup-server:~$ barman receive-wal --create-slot satdb_streaming

Creating physical replication slot 'barman' on server 'satdb_streaming'

Replication slot 'barman' created

barman@backup-server:~$ barman cron

Starting WAL archiving for server satdb_streaming

Starting streaming archiver for server satdb_streaming

barman@backup-server:~$ barman receive-wal satdb_streaming

Starting receive-wal for server satdb_streaming

ERROR: ArchiverFailure:pg_receivexlog not present in $PATH




Barman log



2021-02-24 23:40:02,457 [18648] barman.server INFO: Starting receive-wal for server satdb_streaming

2021-02-24 23:40:02,457 [18647] barman.wal_archiver INFO: No xlog segments found from streaming for satdb_streaming.

2021-02-24 23:40:02,458 [18647] barman.wal_archiver INFO: No xlog segments found from file archival for satdb_streaming.

2021-02-24 23:40:02,539 [18648] barman.server ERROR: ArchiverFailure:pg_receivexlog not present in $PATH

2021-02-24 23:40:05,339 [18651] barman.server INFO: Creating physical replication slot 'barman' on server 'satdb_streaming'

2021-02-24 23:40:05,346 [18651] barman.postgres INFO: Replication slot 'barman' successfully created

2021-02-24 23:40:05,347 [18651] barman.server INFO: Replication slot 'barman' created

2021-02-24 23:40:15,537 [18654] barman.wal_archiver INFO: No xlog segments found from streaming for satdb_streaming.

2021-02-24 23:40:15,538 [18654] barman.wal_archiver INFO: No xlog segments found from file archival for satdb_streaming.

2021-02-24 23:40:15,568 [18655] barman.server INFO: Starting receive-wal for server satdb_streaming

2021-02-24 23:40:15,625 [18655] barman.server ERROR: ArchiverFailure:pg_receivexlog not present in $PATH

2021-02-24 23:41:01,675 [18665] barman.wal_archiver INFO: No xlog segments found from streaming for satdb_streaming.

2021-02-24 23:41:01,675 [18665] barman.wal_archiver INFO: No xlog segments found from file archival for satdb_streaming.

2021-02-24 23:41:01,704 [18666] barman.server INFO: Starting receive-wal for server satdb_streaming

2021-02-24 23:41:01,787 [18666] barman.server ERROR: ArchiverFailure:pg_receivexlog not present in $PATH

2021-02-24 23:41:23,025 [18679] barman.server INFO: Starting receive-wal for server satdb_streaming

2021-02-24 23:41:23,104 [18679] barman.server ERROR: ArchiverFailure:pg_receivexlog not present in $PATH

Savita Pandey

unread,
Feb 24, 2021, 7:17:56 PM2/24/21
to pgba...@googlegroups.com
the rysnc command is 

rsync -a %p barman@barmanserver-ip:/mnt/data/barman/satdb_streaming/incoming/%f'

You received this message because you are subscribed to a topic in the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pgbarman/cLRF1GPvfBg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pgbarman+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pgbarman/b152294e-921c-4753-b647-7201feb36425n%40googlegroups.com.

Luca Ferrari

unread,
Feb 26, 2021, 3:01:49 AM2/26/21
to Barman, Backup and Recovery Manager for PostgreSQL
On Wed, Feb 24, 2021 at 10:32 PM Savita Pandey <savita...@gmail.com> wrote:
> barman.exceptions.LockFilePermissionDenied: /mnt/data/barman/.satdb_streaming-receive-wal.lock
> 2021-02-24 21:16:01,930 [16352] barman.server ERROR: Permission denied, unable to access '/mnt/data/barman/.db-cron.lock'
>

sounds like a filesystem permission problem, have you double checked
the directory belongs (or gives permissions) to your backup user?

> barman@ip:~$ rsync -a %p bar...@10.1.1.13:/mnt/data/barman/satdb_streaming/incoming/%f
> barman@postgres: Permission denied (publickey).

The command cannot work with placeholders on the command line, however
seems you have also an ssh problem.
But in the postgresql log you should get the expandend command, that
is the one you have to report and try.

Luca

Luca Ferrari

unread,
Feb 26, 2021, 11:01:28 AM2/26/21
to Barman, Backup and Recovery Manager for PostgreSQL
On Thu, Feb 25, 2021 at 1:17 AM Savita Pandey <savita...@gmail.com> wrote:
>
> the rysnc command is
>
> rsync -a %p barman@barmanserver-ip:/mnt/data/barman/satdb_streaming/incoming/%f'

This is the archive_command, in the logs you should see something
filenames, like:

rsync -a /postgres/pg_wal/000001000001000000AA
barman@barmanserver-ip:/mnt/data/barman/satdb_streaming/incoming/000001000001000000AA

that you can try on the machine to get any clue.

Luca

Luca Ferrari

unread,
Feb 26, 2021, 11:02:36 AM2/26/21
to Barman, Backup and Recovery Manager for PostgreSQL
On Thu, Feb 25, 2021 at 12:43 AM savita...@gmail.com
<savita...@gmail.com> wrote:
>
> I am trying to set postgres path , as i am getting error
>
> Starting receive-wal for server satdb_streaming
>
> ERROR: ArchiverFailure:pg_receivexlog not present in $PATHBut cannot set as i am unable to find the path , i want to set somnething like this on backup box to fix above error.
>
> i have to set something like this
>
> barman@backup-server:~$ export PATH=$PATH:/usr/pgsql-10/bin/

path_prefix = /usr/pgsql-10/bin/
in your barman.conf

Luca
Reply all
Reply to author
Forward
0 new messages