s3sync icon indicating copy to clipboard operation
s3sync copied to clipboard

HTTP error: content-length does not match

Open obruchez opened this issue 12 years ago • 4 comments

I'm trying to backup one of my old buckets (used with Jungle Disk) and this is what I get:

$ s3sync sync <bucket>: <folder>
/Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/http/net_http_handler.rb:83:in `block (2 levels) in handle': content-length does not match (AWS::Core::Http::NetHttpHandler::TruncatedBodyError)
    from /Users/olivier/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1323:in `block (2 levels) in transport_request'
    from /Users/olivier/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:2672:in `reading_body'
    from /Users/olivier/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1322:in `block in transport_request'
    from /Users/olivier/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
    from /Users/olivier/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
    from /Users/olivier/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1294:in `request'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/http/connection_pool.rb:330:in `request'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/http/net_http_handler.rb:61:in `block in handle'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/http/connection_pool.rb:129:in `session_for'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/http/net_http_handler.rb:55:in `handle'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:244:in `block in make_sync_request'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:273:in `retry_server_errors'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:240:in `make_sync_request'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:502:in `block (2 levels) in client_request'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:382:in `log_client_request'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:468:in `block in client_request'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:364:in `return_or_raise'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/core/client.rb:467:in `client_request'
    from (eval):3:in `get_object'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/s3/s3_object.rb:1324:in `get_object'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-1.19.0/lib/aws/s3/s3_object.rb:1076:in `read'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/sync.rb:349:in `block (2 levels) in download_files'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/sync.rb:348:in `open'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/sync.rb:348:in `block in download_files'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/sync.rb:334:in `each'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/sync.rb:334:in `download_files'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/sync.rb:190:in `run'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/cli.rb:397:in `run'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/cli.rb:456:in `block (2 levels) in run'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/cmdparse-2.0.5/lib/cmdparse.rb:464:in `parse'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/lib/s3sync/cli.rb:469:in `run'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/gems/s3sync-2.0.0/bin/s3sync:66:in `<top (required)>'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/bin/s3sync:23:in `load'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/bin/s3sync:23:in `<main>'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
    from /Users/olivier/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `<main>'

Let me know if you need more information.

obruchez avatar Oct 02 '13 17:10 obruchez

Any luck on this?

ghost avatar Feb 16 '14 02:02 ghost

Hmm, tricky but it seems more like a problem in the server side. When did it happen? Was it in the first file that you tried to sync? Is that a binary file?

I'm trying to think of ways to reproduce this bug. I don't use Jungle Disk but I guess it is another layer to be taken into account.

clarete avatar Feb 22 '14 00:02 clarete

I was doing this on Mac OS. I tried to reproduce the problem, but had problems with Ruby, so I gave up. I've tried on Ubuntu, with the same bucket, and here's what I get:

/var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/sync.rb:365:in `initialize': File name too long - ./14.backups.AGHARTA.C.Documents and Settings.Aline.My Documents.Uni.1_c3_a8re ann_c3_a9e.Histoire.Histoire g_c3_a9n_c3_a9rale.S_c3_a9minaire Mariage.Lectures secondaires.les valeurs _c3_a9ducatives.Les valeurs _c3_a9ducatives (11)_-jpg.file.mtime_001176135858.attr (Errno::ENAMETOOLONG)
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/sync.rb:365:in `open'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/sync.rb:365:in `download_files'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/sync.rb:345:in `each'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/sync.rb:345:in `download_files'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/sync.rb:200:in `run'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/cli.rb:423:in `run'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/cli.rb:80:in `execute'
    from /var/lib/gems/1.8/gems/cmdparse-2.0.5/lib/cmdparse.rb:464:in `parse'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/../lib/s3sync/cli.rb:462:in `run'
    from /var/lib/gems/1.8/gems/s3sync-2.0.1/bin/s3sync:66
    from /usr/local/bin/s3sync:19:in `load'
    from /usr/local/bin/s3sync:19

obruchez avatar Feb 28 '14 08:02 obruchez

Obviously, this is another bug.

obruchez avatar Feb 28 '14 08:02 obruchez