FATAL: archive command failed with exit code 255

2,217 views
Skip to first unread message

Kaushal Shriyan

unread,
Sep 18, 2015, 11:16:56 AM9/18/15
to Barman, Backup and Recovery Manager for PostgreSQL
Hi,

I am currently seeing the below error in postgresl database logs. Any clue?
 

Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]
FATAL:  archive command failed with exit code 255
DETAIL:  The failed archive command was: rsync -a pg_xlog/000000010000000000000001 api...@172.31.18.155:/var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/incoming/000000010000000000000001
LOG:  archiver process (PID 31997) exited with exit code 1
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]
FATAL:  archive command failed with exit code 255
DETAIL:  The failed archive command was: rsync -a pg_xlog/000000010000000000000001 api...@172.31.18.155:/var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/incoming/000000010000000000000001
LOG:  archiver process (PID 32008) exited with exit code 1


barman check ip-172-31-25-49.ap-southeast-1.compute.internal
Server ip-172-31-25-49.ap-southeast-1.compute.internal:
ssh: OK
PostgreSQL: OK
archive_mode: OK
archive_command: OK
directories: OK
retention policy settings: OK
backup maximum age: OK (no last_backup_maximum_age provided)
compression settings: OK
minimum redundancy requirements: OK (have 0 backups, expected at least 0)

 barman list-server
ip-172-31-25-49.ap-southeast-1.compute.internal - Main PostgreSQL Database

barman list-backup ip-172-31-25-49.ap-southeast-1.compute.internal
ip-172-31-25-49.ap-southeast-1.compute.internal 20150918T110403 - STARTED
ip-172-31-25-49.ap-southeast-1.compute.internal 20150918T103934 - STARTED

barman backup ip-172-31-25-49.ap-southeast-1.compute.internal
Starting backup for server ip-172-31-25-49.ap-southeast-1.compute.internal in /var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/base/20150918T110403
Backup start at xlog location: 0/9000028 (000000010000000000000009, 00000028)
Copying files.
Copy done.
Backup size: 29.3 MiB. Actual size on disk: 29.3 MiB (-0.00% deduplication ratio).
Asking PostgreSQL server to finalize the backup.

 barman show-server ip-172-31-25-49.ap-southeast-1.compute.internal
Server ip-172-31-25-49.ap-southeast-1.compute.internal:
active: True
archive_command: rsync -a %p api...@172.31.18.155:/var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/incoming/%f
archive_mode: on
backup_directory: /var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal
backup_options: BackupOptions(['exclusive_backup'])
bandwidth_limit: 4000
basebackup_retry_sleep: 30
basebackup_retry_times: 0
basebackups_directory: /var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/base
compression: gzip
config_file: /opt/apigee4/data/postgresql/pgdata/postgresql.conf
conninfo: host=ip-172-31-25-49.ap-southeast-1.compute.internal user=apigee
current_xlog: 000000010000000000000009
custom_compression_filter: None
custom_decompression_filter: None
data_directory: /opt/apigee4/data/postgresql/pgdata
description: Main PostgreSQL Database
hba_file: /opt/apigee4/data/postgresql/pgdata/pg_hba.conf
ident_file: /opt/apigee4/data/postgresql/pgdata/pg_ident.conf
immediate_checkpoint: False
incoming_wals_directory: /var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/incoming
last_backup_maximum_age: None
lock_file: /var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/ip-172-31-25-49.ap-southeast-1.compute.internal.lock
minimum_redundancy: 0
network_compression: False
pgespresso_installed: False
post_archive_script: env | grep ^BARMAN
post_backup_script: None
pre_archive_script: env | grep ^BARMAN
pre_backup_script: None
retention_policy: None
retention_policy_mode: auto
reuse_backup: link
server_txt_version: 9.3.9
ssh_command: ssh -i /var/lib/barman/.ssh/id_apigee api...@172.31.25.49
tablespace_bandwidth_limit: None
wal_retention_policy: main
wals_directory: /var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/wals


################barman.conf#####################################
;; ; 'main' PostgreSQL Server configuration
[ip-172-31-25-49.ap-southeast-1.compute.internal]
;; ; Human readable description
description =  "Main PostgreSQL Database"
;;
;; ; SSH options
;; ssh_command = ssh api...@172.31.25.49
ssh_command = ssh -i /var/lib/barman/.ssh/id_apigee api...@172.31.25.49
;;
;; ; PostgreSQL connection string
conninfo = host=ip-172-31-25-49.ap-southeast-1.compute.internal user=apigee
###############################################################

##############postgresql.conf#############################################################################################################################
wal_level = 'archive'
archive_mode = 'on'   # allows archiving to be done
        # (change requires restart)
#archive_command = 'rsync -a %p api...@172.31.18.155:/var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/incoming/%f'   # command to use to archive a logfile segment
archive_command = 'rsync -a %p api...@172.31.18.155:/var/lib/barman/ip-172-31-25-49.ap-southeast-1.compute.internal/incoming/%f'   # command to use to archive a logfile segment
########################################################################################################################################################

Any help will be highly appreciable.

Regards,

Kaushal

Joseph Kregloh

unread,
Sep 18, 2015, 11:22:52 AM9/18/15
to pgba...@googlegroups.com
On Fri, Sep 18, 2015 at 11:16 AM, Kaushal Shriyan <kaushal...@gmail.com> wrote:
Hi,

I am currently seeing the below error in postgresl database logs. Any clue?
 

Host key verification failed.

This is your problem, you need to make sure that the user doing the rsync is able to connect from sender to receiver without a password. So using SSH keys. This should also be bi-directional. Login as the user doing the rsync and make sure you can connect to the receiving server.

-Joseph Kregloh
 

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Michael

unread,
Oct 22, 2015, 8:10:31 PM10/22/15
to Barman, Backup and Recovery Manager for PostgreSQL
Not sure if you have fixed the problem.

See http://docs.pgbarman.org/release/1.5.0/ under Prerequisites SSH connection

You need to generate the public key by running ssh-keygen -t rsa without any passphrase ( password) and then copy it over the other server and put it in the authorized_keys file. And vice versa.

Hth
Reply all
Reply to author
Forward
0 new messages