← Back to team overview

duplicity-team team mailing list archive

[Question #256418]: 403 Forbidden when connecting to S3 bucket

 

New question #256418 on Duplicity:
https://answers.launchpad.net/duplicity/+question/256418

I tried many ways to launch duplicity but it always fails returning me error "403 Forbidden". 

Launch params are:
duplicity full --s3-use-new-style --s3-european-buckets /usr/backups_storage/test s3+http://s3-eu-central-1.amazonaws.com/mybucket/

What I have tried:
1) To run duplicity on Freebsd 9.3 and Debian 7.7 (same error)
2) To run both on physical & virtual machines (same error). Physical machine has dedicated IPv4 address while virtual used NATed internal address
3) Changed exception handling to view full error message on line 573 of boto / s3 / connection.py (added 'raise' instead of default value bucket=none). Before doing this, I was getting non-informative error "No connection to backend" and after it became "403 Forbidden"
4) Checked and confirmed ntp is running, server time was correct on all servers. 
5) Checked libssl version - using latest one
6) Run boto without duplicity . I was able to create new bucket and new file (key) in this bucket (S3 Frankfurt). This means that probably reason of the error is in duplicity, not in boto. 
7) Run duplicity using a. duply b. command line c. bash script
8) Put boto config in ~/.aws/credentials and /etc/boto.cfg
9) Put duply config in ~/.duply/*profile*/conf 
10) Put AWS access & secret key directly in command line, e.g.  URL s3+http://AKIAIJIXSV*********:*********3TkTYxhtn0Uh8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/mybucket   (mybucket is example, I created my one which was unique)
11) Created new bucket via web. --s3-european-buckets doesnt help to create new bucket via duplicity
12) Run duplicity from bash script in which I specified AWS access & secret key
export AWS_ACCESS_KEY_ID="**"
export AWS_SECRET_ACCESS_KEY="***"
13) Created different AWS power users to test different Access & Secret keys

I still cannot find solution. Please help me! Below is full error log: 
root@host1:/home/abzal/duplicity # sh backup.sh 
Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1502, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1496, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1329, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 1059, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 952, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backend.py", line 163, in get_backend
    return _backends[pu.scheme](pu)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/_boto_single.py", line 163, in __init__
    self.resetConnection()
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/_boto_single.py", line 186, in resetConnection
    self.bucket = self.conn.lookup(self.bucket_name)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 571, in lookup
    bucket = self.get_bucket(bucket_name, validate, headers=headers)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 502, in get_bucket
    return self.head_bucket(bucket_name, headers=headers)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 535, in head_bucket
    raise err
S3ResponseError: S3ResponseError: 403 Forbidden

And my duply profile conf is:
GPG_PW='*************'
TARGET='s3+http://s3-eu-central-1.amazonaws.com/mybucket/'    #also tried s3.eu-central-1 instead of s3-eu-central-1
TARGET_USER='**'
TARGET_PASS='***'
SOURCE='/usr/backup_storage/test'
VERBOSITY=9

Thank you in advance!

-- 
You received this question notification because you are a member of
duplicity-team, which is an answer contact for Duplicity.