Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#37 TypeError: 'NoneType' object is not iterable

2.x
closed
nobody
None
2014-04-02
2014-02-20
Timothy Laurent
No

Hi --- I am trying to get up and running with barman but I am unable to maki the initial backup.

I am currently using the omnipitr-archive script which calls rsync as my archive command in the postgresql.conf .

The log in the from the omnipitr-archive script indicates that everything completed correctly:

2014-02-20 11:22:29.421490 -0800 : 4558 : omnipitr-archive : LOG : Segment /var/lib/postgresql/9.1/main/pg_xlog/0000000100000001000000A3 successfully sent to all destinations. 2014-02-20 11:22:30.056342 -0800 : 4562 : omnipitr-archive : LOG : Segment /var/lib/postgresql/9.1/main/pg_xlog/0000000100000001000000A4.00000020.backup successfully sent to all destinations. 2014-02-20 11:22:32.012845 -0800 : 4566 : omnipitr-archive : LOG : Segment /var/lib/postgresql/9.1/main/pg_xlog/0000000100000001000000A4 successfully sent to all destinations. 2014-02-20 11:23:09.960271 -0800 : 4592 : omnipitr-archive : LOG : Segment /var/lib/postgresql/9.1/main/pg_xlog/0000000100000001000000A5 successfully sent to all destinations. 2014-02-20 11:34:23.384202 -0800 : 4773 : omnipitr-archive : LOG : Segment /var/lib/postgresql/9.1/main/pg_xlog/0000000100000001000000A6 successfully sent to all destinations. 2014-02-20 11:34:23.945342 -0800 : 4777 : omnipitr-archive : LOG : Segment /var/lib/postgresql/9.1/main/pg_xlog/0000000100000001000000A6.00000020.backup successfully sent to all destinations.
in the postgresql.log file everything looks ducky :
2014-02-20 11:22:33 PST NOTICE: pg_stop_backup complete, all required WAL segments have been archived 2014-02-20 11:29:02 PST WARNING: pgstat wait timeout 2014-02-20 11:34:24 PST NOTICE: pg_stop_backup complete, all required WAL segments have been archived

However I am getting this from the barman side :

barman@tlaurent0898QS:~/main$ barman backup main Starting backup for server main in /var/lib/barman/main/base/20140220T112435 Backup start at xlog location: 1/A6000020 (0000000100000001000000A6, 00000020) Copying files. EXCEPTION: Backup failed copying files

investigating the barman log I am seeing this (btw the 23 in 'data transfer 23' is the return code from the archive command ):

2014-02-20 11:24:01,887 barman.backup INFO: Processed file /var/lib/barman/main/incoming/0000000100000001000000A3 2014-02-20 11:24:01,944 barman.backup ERROR: Backup failed copying files Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/barman/backup.py", line 239, in backup self.backup_stop(backup_info) File "/usr/local/lib/python2.7/dist-packages/barman/backup.py", line 709, in backup_stop stop_xlog, stop_file_name, stop_file_offset = self.server.pg_stop_backup() TypeError: 'NoneType' object is not iterable 2014-02-20 11:24:02,588 barman.backup INFO: Processed file /var/lib/barman/main/incoming/0000000100000001000000A4 2014-02-20 11:24:02,592 barman.backup INFO: Processed file /var/lib/barman/main/incoming/0000000100000001000000A4.00000020.backup 2014-02-20 11:24:35,140 barman.backup INFO: Starting backup for server main in /var/lib/barman/main/base/20140220T112435 2014-02-20 11:24:35,475 barman.backup INFO: Backup start at xlog location: 1/A6000020 (0000000100000001000000A6, 00000020) 2014-02-20 11:24:35,476 barman.backup INFO: Copying files. 2014-02-20 11:25:02,678 barman.backup INFO: Processed file /var/lib/barman/main/incoming/0000000100000001000000A5 2014-02-20 11:35:50,248 barman.backup ERROR: ERROR: data transfer failure 23 None 2014-02-20 11:35:53,391 barman.backup ERROR: Backup failed copying files Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/barman/backup.py", line 230, in backup backup_size = self.backup_copy(backup_info) File "/usr/local/lib/python2.7/dist-packages/barman/backup.py", line 654, in backup_copy raise Exception(msg) Exception: ERROR: data transfer failure 23 2014-02-20 11:36:02,805 barman.backup INFO: Processed file /var/lib/barman/main/incoming/0000000100000001000000A6 2014-02-20 11:36:02,809 barman.backup INFO: Processed file /var/lib/barman/main/incoming/0000000100000001000000A6.00000020.backup

Is there anything I can do to make this actually work ?

one thing I should mention is that after I had bidirectional password-less ssh setup I had to do an initial manual rsync and add the host to the list of authorized hosts to get it to work.

Please help me to fix this problem.

Discussion

    • status: open --> closed
     
  • We currently have no plans to support ad-hoc scripts for archive_command. This might change in the future. If you are interested, please contact us separately.

    I closed this ticket as it does not appear to be a bug in Barman.