leeroybrun / glacier-vault-remove

Remove all archives stored inside an Amazon Glacier vault, even if you have a huge number of them.
379 stars 50 forks source link

boto 'UnexpectedHTTPResponseError' #14

Closed haje01 closed 7 years ago

haje01 commented 9 years ago

It raised following error message:

$ python removeVault.py ap-northeast-1 LIST DEBUG
INFO : Logging level set to DEBUG.
INFO : Connecting to Amazon Glacier...
INFO : Getting list of vaults...
ERROR : <class 'boto.glacier.exceptions.UnexpectedHTTPResponseError'>

I am using OS X El Capitan, and my boto is:

$pip freeze | grep boto
boto==2.38.0
botocore==1.1.1
leeroybrun commented 9 years ago

Maybe can you try again? This may be just a temporary network error.

superbilk commented 9 years ago

Same here, tried with Paython 2.7 and 3.5, same boto version

glacier-vault-remove git:(master) ✗ python3 removeVault.py eu-west-1 LIST DEBUG
INFO : Logging level set to DEBUG.
INFO : Connecting to Amazon Glacier...
INFO : Getting list of vaults...
ERROR : <class 'boto.glacier.exceptions.UnexpectedHTTPResponseError'>
leeroybrun commented 8 years ago

Can you try again too? This seems to be a network related issue.

superbilk commented 8 years ago

Tried again in a different network, same result. Any chance for me to debug it further?

xxdesmus commented 8 years ago

Exact same error also. It's not "network conditions" ...sounds like a legit bug. What else can we try to debug this?

xxdesmus commented 8 years ago

Looks like the issue is account/user permissions. It basically means "the credentials that you are supplying do not have access to take the access you're attempting to take".

I just corrected my permissions -- and now it's running fine.

superbilk commented 8 years ago

Wow, @xxdesmus that's right. I added a new set of credentials and forgot to add a policy (AmazonGlacierFullAccess) Now it works.

@leeroybrun any chance to have a better error message on that case?

leeroybrun commented 8 years ago

Oh right, nice catch!

I've fixed the exceptions' handling, can somebody try to see if the messages are more explicit?

superbilk commented 8 years ago

Unfortunately I can't help. I didn't want to stop my delete-job, it finished today and now my glacier is empty, no vaults or archives left. I just deleted the policy for that user and there is no difference with or without your fix - I don't get any errors (wich is good)

➜  glacier-vault-remove git:(master) python removeVault.py eu-west-1 LIST DEBUG
16:12:19 - INFO : Logging level set to DEBUG.
16:12:19 - INFO : Connecting to Amazon Glacier...
16:12:19 - INFO : Getting list of vaults...
➜  glacier-vault-remove git:(master)