Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barman backup exit with an exception if CommandMaxRetryExceeded is raised #199

Closed
mnencia opened this issue Feb 17, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@mnencia
Copy link
Member

commented Feb 17, 2019

barman@backup:~$ barman backup pg
Starting backup using rsync-exclusive method for server pg in /srv/barman/pg/base/20190211T091052
Backup start at LSN: 2F0A/C6000020 (0000000100002F0A000000C6, 00000020)
Starting backup copy via rsync/SSH for 20190211T091052 (4 jobs)
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 380, in _handle_results
    task = get()
  File "/usr/lib/python2.7/dist-packages/barman/exceptions.py", line 151, in __init__
    super(CommandMaxRetryExceeded, self).__init__(*exc.args)
AttributeError: ("'dict' object has no attribute 'args'", <class 'barman.exceptions.CommandMaxRetryExceeded'>, ({'ret': 255, 'err': u'ssh: Could not resolve hostname pg.redacted.domain: Name or service not known\r\nrsync: connection unexpectedly closed (0 bytes received so far) [Receiver]\nrsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.0]\n', 'out': ''},))

Logs related to that pid:

root@backup:~# grep 28503 /var/log/barman/barman.log
2019-02-11 09:10:52,980 [28503] barman.backup INFO: Starting backup using rsync-exclusive method for server pg in /srv/barman/pg/base/20190211T091052
2019-02-11 09:13:47,250 [28503] barman.backup_executor INFO: Backup start at LSN: 2F0A/C6000020 (0000000100002F0A000000C6, 00000020)
2019-02-11 09:13:47,252 [28503] barman.backup_executor INFO: Starting backup copy via rsync/SSH for 20190211T091052 (4 jobs)
2019-02-11 09:13:47,307 [28503] barman.copy_controller INFO: Copy started (safe before datetime.datetime(2018, 11, 12, 9, 54, 27, 188441, tzinfo=tzlocal()))
2019-02-11 09:13:47,307 [28503] barman.copy_controller INFO: Copy step 1 of 8: [global] analyze remote PGDATA directory: /srv/postgresql/9.6/data/
2019-02-11 09:14:06,697 [28503] barman.copy_controller INFO: Copy step 2 of 8: [global] create destination directories and delete unknown files for remote PGDATA directory: /srv/postgresql/9.6/data/

After the error, the barman process does not respond to CTRL-C and need to be killed with SIGTERM.
The backup remains in STARTED state and a manual SELECT pg_stop_backup() needs to be issued to clear the PostgreSQL state.

@mnencia mnencia self-assigned this Feb 17, 2019

@mnencia mnencia added the bug label Feb 17, 2019

@mnencia mnencia added this to the 2.7 milestone Feb 17, 2019

@mnencia mnencia closed this in 7957caa Feb 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.