[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] frequent 'Connection reset by peer' errors
From: |
gnugoat |
Subject: |
Re: [Duplicity-talk] frequent 'Connection reset by peer' errors |
Date: |
Fri, 31 Mar 2017 11:28:13 -0700 (MST) |
duplicity-talk mailing list wrote
>> > I had to copy the function 'retry' from duplicity/backend.py to
>> > onedrivebackend.py too otherwise I got some syntax error.
>>
>> yeah right, sorry, forgot the import statement. add on top after all the
>> other imports
>
> Ah, I see. Now I got two different errors. One:
>
> Traceback (most recent call last):
> File "/usr/dup/usr/bin/duplicity", line 1546, in
> <module>
> with_tempdir(main)
> File "/usr/dup/usr/bin/duplicity", line 1540, in with_tempdir
> fn()
> File "/usr/dup/usr/bin/duplicity", line 1375, in main
> action = commandline.ProcessCommandLine(sys.argv[1:])
> File
> "/usr/dup/usr/lib/python2.7/site-packages/duplicity/commandline.py", line
> 1126, in ProcessCommandLine
> backup, local_pathname = set_backend(args[0], args[1])
> File
> "/usr/dup/usr/lib/python2.7/site-packages/duplicity/commandline.py", line
> 1015, in set_backend
> globals.backend = backend.get_backend(bend)
> File "/usr/dup/usr/lib/python2.7/site-packages/duplicity/backend.py",
> line 223, in get_backend
> obj = get_backend_object(url_string)
> File "/usr/dup/usr/lib/python2.7/site-packages/duplicity/backend.py",
> line 209, in get_backend_object
> return factory(pu)
> File
> "/usr/dup/usr/lib/python2.7/site-packages/duplicity/backends/onedrivebackend.py",
> line 91, in __init__
> self.resolve_directory()
> File "/usr/dup/usr/lib/python2.7/site-packages/duplicity/backend.py",
> line 378, in inner_retry
> code = _get_code_from_exception(self.backend, operation, e)
> AttributeError: 'OneDriveBackend' object has no attribute 'backend'
>
>
>
>
> and second
>
>
> Backtrace of previous error: Traceback (innermost last):
> File "/usr/dup/usr/lib/python2.7/site-packages/duplicity/backend.py",
> line 369, in inner_retry
> return fn(self, *args)
> File
> "/usr/dup/usr/lib/python2.7/site-packages/duplicity/backends/onedrivebackend.py",
> line 190, in resolve_directory
> files = self.get_files(object_id)
> File
> "/usr/dup/usr/lib/python2.7/site-packages/duplicity/backends/onedrivebackend.py",
> line 218, in get_files
> response = self.http_client.get(self.API_URI + path + '/files')
> File "/usr/dup/usr/lib/python2.7/site-packages/requests/sessions.py",
> line 501, in get
> return self.request('GET', url, **kwargs)
> File
> "/usr/dup/usr/lib/python2.7/site-packages/requests_oauthlib/oauth2_session.py",
> line 358, in request
> headers=headers, data=data, **kwargs)
> File "/usr/dup/usr/lib/python2.7/site-packages/requests/sessions.py",
> line 488, in request
> resp = self.send(prep, **send_kwargs)
> File "/usr/dup/usr/lib/python2.7/site-packages/requests/sessions.py",
> line 609, in send
> r = adapter.send(request, **kwargs)
> File "/usr/dup/usr/lib/python2.7/site-packages/requests/adapters.py",
> line 479, in send
> raise ConnectionError(err, request=request)
> ConnectionError: ('Connection aborted.', error(104, 'Connection reset by
> peer'))
>
>
> Which is I guess the same problem, just called from different place?
>
> In both occasions duplicity exited after that.
>
>
>
>> > Retry(total=0, connect=None, read=False, redirect=None)
>> > Timeout(connect=None, read=None, total=None)
>>
>> well, that won't change. but what will change is that duplicity itself
>> will retry on failure. i had a short look on how to configure the retry
>> in urllib3 but that seemed cumbersome.
>
> Ah, I see what you are going for.
>
>
>
>> > when running
>> >
>> > duplicity -v 9 \
>> > --archive-dir=/tmp/run/mountd/sda1/duplicity_cache \
>> > --asynchronous-upload \
>> > --tempdir=/tmp/run/mountd/sda1/duplicity_tmp \
>> > --num-retries=765 \
>> > --dry-run \
>> > /tmp/run/mountd/sda1/Backup.new/Photos/2016 \
>> > onedrive://backup/Photos/2016
>> >
>> > and later on third run
>> >
>> > ...
>> > error(104, 'Connection reset by peer')
>> >
>>
>> applicating the retry decorator you should see the error but, but also
>> the retries up to --num-retries count or success.
>
> Wow, decorator is a nice construct!
>
> Thank you
> __
> Vlad
>
> _______________________________________________
> Duplicity-talk mailing list
> Duplicity-talk@
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Hi Vlad,
thanks for posting the workaround editing the adapters.py! I was
experiencing the same problem on my three raspberry pis. For some reason the
"connection reset" errors started on all devices the last days. After
hacking the adapters.py with "retries=5" backup works fine again.
gnugoat
--
View this message in context:
http://nongnu.13855.n7.nabble.com/frequent-Connection-reset-by-peer-errors-tp220309p221123.html
Sent from the duplicity-talk mailing list archive at Nabble.com.