"WARNING: Retrying failed request" when listing objects in a bucket
When listing all the objects in a S3 bucket, the following WARNING is shown every time:
WARNING: Retrying failed request: /?marker=100PENTX/IMGP0125.JPG () WARNING: Waiting 3 sec...
In the end the listing does succeed, but this warning is given every time. Looks like it's something to do with a failed "next marker" request, the bucket contains more than 1000 files. After initial failure, it always succeeds.
which version please, and where is the bucket? Is this transient (e.g. it occurs only occasionally), or every time you list this bucket?
Thanks, Matt
On Fri, Apr 18, 2014 at 3:32 AM, matteobar [email protected] wrote:
When listing all the objects in a S3 bucket, the following WARNING is shown every time:
WARNING: Retrying failed request: /?marker=100PENTX/IMGP0125.JPG () WARNING: Waiting 3 sec...
In the end the listing does succeed, but this warning is given every time. Looks like it's something to do with a failed "next marker" request, the bucket contains more than 1000 files. After initial failure, it always succeeds.
— Reply to this email directly or view it on GitHubhttps://github.com/s3tools/s3cmd/issues/314 .
Latest s3cmd version, downloaded from master github branch just today. OS is Linux CentOS. Bucket is in the US (East I believe). Command used is : s3cmd ls s3://bucketname -r (recursive). It happens every time the command is issued so it should be reproducible. It always fails with WARNING once but then it's OK. I can't give info on the bucket for security reasons, but I will try to create a new bucket with public accessible content and see if I can recreate this issue in a new bucket. thanks
OK, thanks. I haven't been able to reproduce this in my own buckets (US-east-1) which have several thousand objects each.
On Fri, Apr 18, 2014 at 8:19 AM, matteobar [email protected] wrote:
Latest s3cmd version, downloaded from master github branch just today. OS is Linux CentOS. Bucket is in the US (East I believe). Command used is : s3cmd ls s3://bucketname -r (recursive). It happens every time the command is issued so it should be reproducible. It always fails with WARNING once but then it's OK. I can't give info on the bucket for security reasons, but I will try to create a new bucket with public accessible content and see if I can recreate this issue in a new bucket. thanks
— Reply to this email directly or view it on GitHubhttps://github.com/s3tools/s3cmd/issues/314#issuecomment-40807738 .
Please try: s3cmd ls s3://s3cmdtestmarker or s3cmd du s3://s3cmdtestmarker
I constantly get :
WARNING: Retrying failed request: /?marker=New%20Bitmap%20Image%20-%20Copy%20(528)%20-%20Copy%20-%20Copy.bmp&delimiter=/ () WARNING: Waiting 3 sec...
and then it works fine after that. This happens always for me, every time I issue a listing command to fetch more than 1000 objects. I am running CentOS from within the Windows Azure infrastructure, so all the requests are within the USA. Strange.
This is also happening for me using 1.5.0-beta1
Hi kyleboon, do you get the same s3cmd warning using the same bucket s3://s3cmdtestmarker or some other bucket? thanks
Have been getting this same error. Finally, had to switch to aws-cli. Funny enough, it only happened when it was run via a cron-job. It ended up filling our inboxes pretty quickly (about 6 times a day, at least).
The weird thing was that it failed without a message for the exception. The parenthesis should contain the exception message, but none is present.
Anyway, we're probably gonna stick to aws-cli, but if you guys need any help, I'm here.
@matteobar sorry I could have been more clear. I'm seeing this warning when using s3cmd to sync my octopress blog with s3.
Here's an example of the output:
WARNING: Retrying failed request: /?marker=logs/2013-07-24-00-34-11-B45A917F52429C42 ('')
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?marker=logs/2013-07-29-18-22-15-FF20AE4C1307B61A ('')
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?marker=logs/2013-08-03-21-20-50-BC25B564614B6053 ('')
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?marker=logs/2013-08-14-08-25-42-7F526DEB9A50EAED ('')
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?marker=logs/2013-08-20-00-27-45-0CBE760C8002A59B ('')
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?marker=logs/2013-08-26-01-34-03-1C40A40DA326DB01 ('')
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?marker=logs/2013-09-05-13-41-44-8AEB0CA004C0ED52 ('')
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?marker=logs/2013-09-10-21-28-57-CA7B2989ED7D9F8F ('')
WARNING: Waiting 3 sec...
Here's the command I'm using (from a rake task):
ok_failed system("s3cmd sync -P public/* s3://#{s3_bucket}/ --mime-type='text/html; charset=utf-8' --add-header 'Content-Encoding: gzip' --exclude '*.*' --include '*.html'")
# sync non gzipped, non js/css/image files
ok_failed system("s3cmd sync --guess-mime-type -P public/* s3://#{s3_bucket}/ --exclude 'images/' --exclude '*.css' --exclude '*.js' --exclude '*.html'")
# sync gzipped css and js
ok_failed system("s3cmd sync --guess-mime-type -P public/* s3://#{s3_bucket}/ --add-header 'Content-Encoding: gzip' --add-header 'Cache-Control: public, max-age=31600000' --exclude '*.*' --include '*.js' --include '*.css'")
# sync all images
ok_failed system("s3cmd sync --guess-mime-type -P --add-header 'Cache-Control: public, max-age=31600000' public/images/* s3://#{s3_bucket}/images/")
I tried
s3cmd ls s3://s3cmdtestmarker
as well and see the exceptions there too.
Interesting. I run the s3cmd ls s3://s3cmdtestmarker (Fedora 20 system) and do not see any "Retrying failed request" messages. Can you run with --debug and post the results somewhere? What kind of system are you on? What python version?
Separately, why are you using Content-Encoding: gzip ? Not that it matters in this case, but that value is to be set by a web server that itself does the gzip compression on a file for transmission, so the receiving server knows to ungzip it before writing it to disk. s3cmd no longer tries to gzip content before transmission, or to detect that a file was already gzipped on disk. That bug was fixed a few weeks ago.
Thanks, Matt
On Tue, Apr 22, 2014 at 9:15 AM, Kyle Boon [email protected] wrote:
I tried
s3cmd ls s3://s3cmdtestmarker
as well and see the exceptions there too.
— Reply to this email directly or view it on GitHubhttps://github.com/s3tools/s3cmd/issues/314#issuecomment-41044431 .
For me, it happens both under CentOS 6.5 (Python 2.6.6) and Windows 7 (Python 2.7.6). Here is the output on CentOS with --debug flag used (I have truncated the irrelevant parts see "...truncated...")
DEBUG: ConfigParser: Reading file '/home/matteo/.s3cfg'
DEBUG: ConfigParser: access_key->AK...17_chars...Q
DEBUG: ConfigParser: access_token->
DEBUG: ConfigParser: add_encoding_exts->
DEBUG: ConfigParser: add_headers->
DEBUG: ConfigParser: bucket_location->US
DEBUG: ConfigParser: cache_file->
DEBUG: ConfigParser: cloudfront_host->cloudfront.amazonaws.com
DEBUG: ConfigParser: default_mime_type->binary/octet-stream
DEBUG: ConfigParser: delay_updates->False
DEBUG: ConfigParser: delete_after->False
DEBUG: ConfigParser: delete_after_fetch->False
DEBUG: ConfigParser: delete_removed->False
DEBUG: ConfigParser: dry_run->False
DEBUG: ConfigParser: enable_multipart->True
DEBUG: ConfigParser: encoding->UTF-8
DEBUG: ConfigParser: encrypt->False
DEBUG: ConfigParser: expiry_date->
DEBUG: ConfigParser: expiry_days->
DEBUG: ConfigParser: expiry_prefix->
DEBUG: ConfigParser: follow_symlinks->False
DEBUG: ConfigParser: force->False
DEBUG: ConfigParser: get_continue->False
DEBUG: ConfigParser: gpg_command->/usr/bin/gpg
DEBUG: ConfigParser: gpg_decrypt->%(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
DEBUG: ConfigParser: gpg_encrypt->%(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
DEBUG: ConfigParser: gpg_passphrase->12...3_chars...6
DEBUG: ConfigParser: guess_mime_type->True
DEBUG: ConfigParser: host_base->s3.amazonaws.com
DEBUG: ConfigParser: host_bucket->%(bucket)s.s3.amazonaws.com
DEBUG: ConfigParser: human_readable_sizes->False
DEBUG: ConfigParser: ignore_failed_copy->False
DEBUG: ConfigParser: invalidate_default_index_on_cf->False
DEBUG: ConfigParser: invalidate_default_index_root_on_cf->True
DEBUG: ConfigParser: invalidate_on_cf->False
DEBUG: ConfigParser: list_md5->False
DEBUG: ConfigParser: log_target_prefix->
DEBUG: ConfigParser: max_delete->-1
DEBUG: ConfigParser: mime_type->
DEBUG: ConfigParser: multipart_chunk_size_mb->15
DEBUG: ConfigParser: preserve_attrs->True
DEBUG: ConfigParser: progress_meter->True
DEBUG: ConfigParser: proxy_host->
DEBUG: ConfigParser: proxy_port->0
DEBUG: ConfigParser: put_continue->False
DEBUG: ConfigParser: recursive->False
DEBUG: ConfigParser: recv_chunk->4096
DEBUG: ConfigParser: reduced_redundancy->False
DEBUG: ConfigParser: restore_days->1
DEBUG: ConfigParser: secret_key->ac...37_chars...P
DEBUG: ConfigParser: send_chunk->4096
DEBUG: ConfigParser: server_side_encryption->False
DEBUG: ConfigParser: simpledb_host->sdb.amazonaws.com
DEBUG: ConfigParser: skip_existing->False
DEBUG: ConfigParser: socket_timeout->6300
DEBUG: ConfigParser: urlencoding_mode->normal
DEBUG: ConfigParser: use_https->True
DEBUG: ConfigParser: use_mime_magic->True
DEBUG: ConfigParser: verbosity->WARNING
DEBUG: ConfigParser: website_endpoint->http://%(bucket)s.s3-website-%(location)s.amazonaws.com/
DEBUG: ConfigParser: website_error->
DEBUG: ConfigParser: website_index->index.html
DEBUG: Updating Config.Config cache_file ->
DEBUG: Updating Config.Config encoding -> UTF-8
DEBUG: Updating Config.Config follow_symlinks -> False
DEBUG: Updating Config.Config verbosity -> 10
DEBUG: Unicodising 'ls' using UTF-8
DEBUG: Unicodising 's3://s3cmdtestmarker' using UTF-8
DEBUG: Command: ls
DEBUG: Bucket 's3://s3cmdtestmarker':
DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-date:Wed, 23 Apr 2014 00:25:41 +0000\n/s3cmdtestmarker/'
DEBUG: CreateRequest: resource[uri]=/
DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-date:Wed, 23 Apr 2014 00:25:41 +0000\n/s3cmdtestmarker/'
DEBUG: Processing request, please wait...
DEBUG: get_hostname(s3cmdtestmarker): s3cmdtestmarker.s3.amazonaws.com
DEBUG: ConnMan.get(): creating new connection: https://s3cmdtestmarker.s3.amazonaws.com
DEBUG: format_uri(): /?delimiter=/
DEBUG: Sending request method_string='GET', uri='/?delimiter=/', headers={'content-length': '0', 'Authorization': 'AWS AKIAJHTJDKCPCLKAQENQ:SmXUQcuukU48/RhVtmFPyiUb/go=', 'x-amz-date': 'Wed, 23 Apr 2014 00:25:41 +0000'}, body=(0 bytes)
DEBUG: Response: {'status': 200, 'headers': {'x-amz-id-2': 'cOZD45+ZYH6DV1Rem5TukghJSGFAJXWuE4bxUh8ZBXgtj0+xboYPbZSfamky92Fi', 'server': 'AmazonS3', 'transfer-encoding': 'chunked', 'x-amz-request-id': '84442972E9122035', 'date': 'Wed, 23 Apr 2014 00:25:33 GMT', 'content-type': 'application/xml'}, 'reason': 'OK', 'data': '\n
I'm on OSX 10.9.2 running python 2.7.5.
Oddly enough tonight its not giving me those errors for the s3cmdtestmarker bucket.
I am copying gzipped files themselves to amazone s3 because I'm using it to host a static web site. It won't do the compression but it will set the content-encoding so the browser knows the decompress the files.
@mdomsch I can try debugging this, if you can point me to the approximate location / module where this failure is likely happening ...
On Tue, Apr 22, 2014 at 9:24 PM, matteobar [email protected] wrote:
@mdomsch https://github.com/mdomsch I can try debugging this, if you can point me to the approximate location / module where this failure is likely happening ...
Yes please.
s3cmd: line 146 subcmd_bucket_list() calls S3/S3.py line 241 bucket_list() calls S3/S3.py line 276 bucket_list_noparse() calls send_request S3/S3.py: line 847 inside send_request() prints the message after getting an Exception that we aren't specifically handling.
I thought this might be the socket_timeout being set to low in ~/.s3cfg, but @matteobar 's debug shows his socket timeout is set very large. If others reporting a problem here could check their socket_timeout is at least 300, and if not, see if that resolves the problem. Thanks.
I'm on OS X 10.6.8 running s3cmd version 1.5.0-beta1 and Python 2.7.4, and have the exact same issue. I have socket_timeout set to 300, and increasing it to 500 did not help.
Thanks, Ravi
Any update on this?
I'm having the same issue. Ubuntu 13.10 and s3cmd version 1.5.0-beta1 socket_timeout = 300
Same thing is happening to us on a CentOS 64 bits and the s2cmd version 1.5.0-rc1. Buckets on Ireland.
I have this issue with the same config as brafales above on an Ireland bucket.