Support http_proxy

Bug #409739 reported by Neal H. Walfield
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Duplicity
Confirmed
Low
Unassigned
Déjà Dup
Invalid
Low
Unassigned
deja-dup (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: deja-dup

I'm using my own S3 server. deja-dup does not support setting the S3 server
(i.e., it appears to be hard coded to use aws.amazon.com). Generally this is not
a problem if the program would respect the http proxy setting, however, deja-dup
does not appear to do this. When I run deja-dup as follows:

  http_proxy=http://localhost:8080 deja-dup

it fails and I do not see any access attempts in my S3 server's logs.

Thanks.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/deja-dup
Package: deja-dup 7.4-0ubuntu2
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
SourcePackage: deja-dup
Uname: Linux 2.6.28-14-generic i686

Revision history for this message
Neal H. Walfield (neal-walfield) wrote :
Revision history for this message
Michael Terry (mterry) wrote :

Interesting. It's true that deja-dup does not let you choose your own server. I'd never heard of http_proxy before.

Changed in deja-dup:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Duplicity does allow you to chose your own s3 server, so this is strictly a deja-dup issue.

Changed in duplicity:
status: New → Invalid
Revision history for this message
Michael Terry (mterry) wrote :

You're right about choosing s3 server, but I figured it would be good for duplicity to use http_proxy regardless. It's a common linux method of specifying a proxy. I'm not reopening, but I think it makes sense to implement the proxy support in duplicity.

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 409739] Re: alternate s3 servers / http_proxy

Michael Terry wrote:
> You're right about choosing s3 server, but I figured it would be good
> for duplicity to use http_proxy regardless. It's a common linux method
> of specifying a proxy. I'm not reopening, but I think it makes sense to
> implement the proxy support in duplicity.

Then it should be a different bug / enhancement request. I know nothing
about proxy's, so it would be good to learn.

Revision history for this message
Michael Terry (mterry) wrote :

I also know nothing about implementing proxies. As I read it, this bug was really about adding support for http_proxy, as a means to the end of using a different s3 server. Or at least, it is now, since I changed the title. :)

summary: - alternate s3 servers / http_proxy
+ Support http_proxy
Changed in duplicity:
status: Invalid → Confirmed
Changed in duplicity:
importance: Undecided → Low
Michael Terry (mterry)
Changed in deja-dup:
status: Confirmed → Invalid
Changed in deja-dup (Ubuntu):
status: New → Invalid
Revision history for this message
Hamish Moffatt (hmof) wrote :

Any chance that this will be supported? At least for S3? I'm using duplicity directly, not deja-dup.

Revision history for this message
Jordan (lemon-and-iddy) wrote :

This almost works.. it fails for me when i have a large number of files to backup, and works fine when there's just a few. The number of files is not consistent though, with ~2000 files it sometimes works and sometimes doesn't.

I'm using a swift-based provider and swift itself can upload the files using a proxy fine and very quickly. Is there a way we can just dump the duplicity backups locally after reading them from the server and upload them manually?

Curiously the the failure message is an SSL mismatch one from the requests library. Looking at the packet dump when it works duplicity uses TLS 1.2 the whole time. When it fails a "Encypted Alert" packet arrives.

Without changing the verbosity it hangs while uploading the diff tars, with the output: `Attempt 1 failed. ConnectionError: None`

And running duplicity with the `--verbosity d` argument gives me the accompanying:

```
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/duplicity/backend.py", line 374, in inner_retry
    return fn(self, *args)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/duplicity/backend.py", line 545, in put
    self.__do_put(source_path, remote_filename)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/duplicity/backend.py", line 531, in __do_put
    self.backend._put(source_path, remote_filename)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/duplicity/backends/swiftbackend.py", line 150, in _put
    open(util.fsdecode(source_path.name), u'rb'))
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/swiftclient/client.py", line 1913, in put_object
    response_dict=response_dict)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/swiftclient/client.py", line 1753, in _retry
    service_token=self.service_token, **kwargs)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/swiftclient/client.py", line 1380, in put_object
    conn.putrequest(path, headers=headers, data=data)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/swiftclient/client.py", line 484, in putrequest
    return self.request('PUT', full_path, data, headers, files)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/swiftclient/client.py", line 472, in request
    files=files, **self.requests_args)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/swiftclient/client.py", line 453, in _request
    return self.request_session.request(*arg, **kwarg)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packiddyages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/me/.virtualenvs/duplicity/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
 requests.exceptions.ConnectionError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:852)
```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.