[go: up one dir, main page]

Uploading to webdavs fails with timeouts

I have:

  • searched https://gitlab.com/duplicity/duplicity/-/issues for similar issues. If you find a similar issue and the issue is still open, add a comment to the existing issue instead of opening a new one. If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
  • searched https://bugs.launchpad.net/duplicity for similar issues. If you find a similar issue, open a new issue on here and include a link to the original issue in the body of your new one.
  • tested that this issue still occurs on the latest stable snap (install instructions: https://snapcraft.io/duplicity), please include the snap version (snap info duplicity | grep installed) output: installed: x.xx.xx (xx)
  • ideally, tested that this issue still occurs on the latest edge snap, if you can test without risking your data. Please include the snap version output: installed: x.xx.xx (xx)

Summary

Backup to WebDavs fails with timeouts. As soon duplicity want to start uploading files, it's getting timeouts. Beforehand in the proces, reading from the server is working perfectly. Adding a --timeout amount doesn't make a difference.

Steps to reproduce

Using stackstorage.com as my webdavs backup site. It's an owncloud instance by a Dutch ISP.

$ snap info duplicity|grep installed
installed:          0.8.16                  (117) 98MB classic
$ snap run duplicity -v d --log-file ~/dup.log /data/EigenMedia webdavs://USERNAME:PASSWORD@djslash.stackstorage.com/remote.php/webdav/echoes/EigenMedia

What is the current bug behaviour?

Getting "Attempt 1 failed. timeout: The write operation timed out", etc.

What is the expected correct behaviour?

Uploading backups to webdav without timeouts.

Relevant logs and/or screenshots

I just cut out the part where it goes wrong, the whole debug log contains a lot of info that isn't relevant. This log was when running the latest snap.

INFO 1
. Writing duplicity-full.20201026T102442Z.vol1.difftar.gpg

INFO 1
. WebDAV PUT /remote.php/webdav/echoes/EigenMedia/duplicity-full.20201026T102442Z.vol1.difftar.gpg request with headers: {'Connection': 'keep-alive', 'Authorization': 'Basic REDACTED'} 

INFO 1
. WebDAV data length: 602228362 

DEBUG 1
. Backtrace of previous error: Traceback (innermost last):
.   File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 384, in inner_retry
.     return fn(self, *args)
.   File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 555, in put
.     self.__do_put(source_path, remote_filename)
.   File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 541, in __do_put
.     self.backend._put(source_path, remote_filename)
.   File "/usr/lib/python3/dist-packages/duplicity/backends/webdavbackend.py", line 452, in _put
.     raise e
.   File "/usr/lib/python3/dist-packages/duplicity/backends/webdavbackend.py", line 440, in _put
.     response = self.request(u"PUT", url, source_file.read())
.   File "/usr/lib/python3/dist-packages/duplicity/backends/webdavbackend.py", line 221, in request
.     self.conn.request(method, quoted_path, data, self.headers)
.   File "/usr/lib/python3/dist-packages/duplicity/backends/webdavbackend.py", line 125, in request
.     return http.client.HTTPSConnection.request(self, *args, **kwargs)
.   File "/usr/lib/python3.8/http/client.py", line 1255, in request
.     self._send_request(method, url, body, headers, encode_chunked)
.   File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request
.     self.endheaders(body, encode_chunked=encode_chunked)
.   File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders
.     self._send_output(message_body, encode_chunked=encode_chunked)
.   File "/usr/lib/python3.8/http/client.py", line 1049, in _send_output
.     self.send(chunk)
.   File "/usr/lib/python3.8/http/client.py", line 971, in send
.     self.sock.sendall(data)
.   File "/usr/lib/python3.8/ssl.py", line 1204, in sendall
.     v = self.send(byte_view[count:])
.   File "/usr/lib/python3.8/ssl.py", line 1173, in send
.     return self._sslobj.write(data)
.  socket.timeout: The write operation timed out
. 

Remarks

  • On launchpad, there was one bug that might be related, but it was ages ago and with all different versions.
  • When using curl to upload files (largest file being ~117Mb), it works.
  • Tried disabling ipv6, didn't make a difference.
  • Tried on two different machines on different connections, same result.