Frequent BackendException:s lately (SFTP)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
New
|
Undecided
|
Unassigned | ||
Python |
Fix Released
|
Unknown
|
Bug Description
I have had a backup script using duplicity running for a long time. Recently (I have noticed it since mid-January, perhaps related to the introduction of python-paramiko) it frequently (not always) fails with (using switches "--asynchronous
"""
AsyncScheduler: task execution done (success: False)
....[some files added to next volume]...
AsyncScheduler: scheduling task for asynchronous execution
AsyncScheduler: a previously scheduled task has failed; propagating the result
immediately
Backend error detail: Traceback (most recent call last):
File "/usr/bin/
with_
File "/usr/bin/
fn()
File "/usr/bin/
full_
File "/usr/bin/
globals.
File "/usr/bin/
(tdp, dest_filename, vol_num)))
File "/usr/lib/
151, in schedule_task
return self.__
File "/usr/lib/
215, in __run_asynchron
with_
File "/usr/lib/
in with_lock
return fn()
File "/usr/lib/
196, in wait_for_
check_
File "/usr/lib/
191, in check_pending_
self.
File "/usr/lib/
in caller
value = fn()
File "/usr/lib/
183, in <lambda>
(waiter, caller) = async_split(lambda: fn(*params))
File "/usr/bin/
async_
vol_num: put(tdp, dest_filename, vol_num),
File "/usr/bin/
backend.
File "/usr/lib/
line 189, in put
raise BackendExceptio
(source_
BackendException: sftp put of /media/
tempdir/
full.20120207T1
"""
and to STDERR it is written
"""
No handlers could be found for logger "paramiko.
BackendException: sftp put of /media/
tempdir/
full.20120207T1
"""
It sounds like a local connection error, but it has never happened before and the error mentions paramiko explicitly. I have recently started using "--asynchronous
It happens more often during full backups, when 20GB+ is transferred (default volume size 25MB), than during incremental backups when only a few volumes typically are transferred.
Perhaps it is a local connection error that always have existed, but the previous SFTP backend retried as default action instead of failing.
Also reported as Debian bug #659007, but it has gotten no attention for a month.
Duplicity 0.6.17
Python 2.7.2+
Debian Sid
Linux
Changed in python: | |
status: | Unknown → New |
Changed in python: | |
status: | New → Fix Released |
Re-ran with "-v9" until an error occured. It confirms my suspicion that it has to do with the switch to python-paramiko.
STDOUT (which I log to /var/log) is very similar to the -v5 one reported above. It is attached as "duplicity- error-full- stdout- log-v9"
STDERR gave more information. Full output (except repeated lines as indicated):
-----
ssh: starting thread (client mode): 0xa11d48cL 'diffie- hellman- group-exchange- sha256' , 'diffie- hellman- group-exchange- sha1', 'diffie- hellman- group14- sha1', 'diffie- hellman- group1- sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt: ['aes128- ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '<email address hidden>'] server encrypt: ['aes128- ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '<email address hidden>'] client mac:['hmac-md5', 'hmac-sha1', '<email address hidden>', 'hmac-ripemd160', '<email address hidden>', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', '<email address hidden>', 'hmac-ripemd160', '<email address hidden>', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', '<email address hidden>'] server compress:['none', '<email address hidden>'] client lang:[''] server lang:[''] kex follows?False hellman- group1- sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none xxxxxxxxxxxxxxx xx in /root/.ssh/id_rsa home/daniel/ backup/ home') home/daniel/ backup/ home') '/home/ daniel/ backup/ home') home/daniel/ backup/ home/daniel' ) home/daniel/ backup/ home/daniel' ) '/home/ daniel/ backup/ home/daniel' ) '/home/ daniel/ backup/ home/daniel/ .') '/home/ daniel/ backup/ home/daniel/ .')
ssh: Connected (version 2.0, client OpenSSH_5.3p1)
ssh: kex algos:[
ssh: Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
ssh: using kex diffie-
ssh: Switch to new keys ...
ssh: Trying discovered key xxxxxxxxxxxxxxx
ssh: userauth is OK
ssh: Authentication (publickey) successful!
ssh: [chan 1] Max packet in: 34816 bytes
ssh: [chan 1] Max packet out: 32768 bytes
ssh: Secsh channel 1 opened.
ssh: [chan 1] Sesch channel 1 request ok
ssh: [chan 1] Opened sftp connection (server version 3)
ssh: [chan 1] stat('backup')
ssh: [chan 1] stat('backup')
ssh: [chan 1] normalize('backup')
ssh: [chan 1] stat('/
ssh: [chan 1] stat('/
ssh: [chan 1] normalize(
ssh: [chan 1] stat('/
ssh: [chan 1] stat('/
ssh: [chan 1] normalize(
ssh: [chan 1] listdir(
ssh: [chan 1] listdir(
...[SNIP of second thread initializing, giving ~identical output to all previous lines]...
ssh: [chan 1] open('/ home/daniel/ backup/ home/daniel/ duplicity- full.20120305T1 05839Z. vol1.difftar. gpg', 'wb') "'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/ python2. 7/threading. pyc'> ignored home/daniel/ backup/ home/daniel/ duplicity- full.20120305T1 05839Z. vol1.difftar. gpg', 'wb') -> 00000000 home/daniel/ backup/ hom...
Exception AttributeError: AttributeError(
ssh: [chan 1] open('/
ssh: [chan 1] close(00000000)
ssh: [chan 1] stat('/