mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #324] Multipart Upload fails with 411 Length Required #168
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#168
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anaelcarvalho on GitHub (Jan 8, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/324
When copying a file that requires a multipart upload (file size greater than 10MB by default), the Initiate Multipart Upload call fails with a status code of 411 Length Required. As per AWS API documentation, this status code means that the "Content-Length" header is missing. Curl debug information shows that this header was not sent:
Changing the following line in curl.cpp
To the below:
Appears to have fixed the issue, with "Content-Length" now being sent with a value of 0:
This is a bit confusing, though, as the documentation doesn't list this header as required (in fact, the sample requests do not even include it). Should it be treated as a bug?
Thanks!
@gaul commented on GitHub (Jan 9, 2016):
@anaelcarvalho Could you provide the exact steps to reproduce your symptoms as well as which version of s3fs you use?
@anaelcarvalho commented on GitHub (Jan 9, 2016):
Sure -
s3fs <BUCKET> /mnt/mountpoint -o passwd_file=/path/to/passwdcp testfile.zip /mnt/mountpointBuilt from master branch, commit
ea151a7- don't think it has a version tag yet (1.80-dev?)@ggtakec commented on GitHub (Jan 9, 2016):
@anaelcarvalho
I tried multipart upload with 32-64MB files, but could not get same 411 error.
I uploaded files by sigv4 and sigv2, both are succeed without error.
I have some question about your environment.
Do you use any proxy to s3.amazonaws.com?
And we should know about the region on your bucket.
Thanks in advance for your help.
@anaelcarvalho commented on GitHub (Jan 9, 2016):
@ggtakec
I tried sigv2 in addition to the default sigv4 with same results.
No proxy, region is sa-east-1. I suspect this region may have a slightly different configuration that requires the "Content-Length" header parameter. Haven't tried a different region yet, though.
@ggtakec commented on GitHub (Jan 9, 2016):
@anaelcarvalho Thanks a lot.
If you can, please try to run s3fs with "dbglevel" and "curldbg"(please see man page for detail).
It puts many debug messages, I want to know Initial-MultipartUpload request and response which are put by s3fs.
I don't know about "Proxy-Connection: Keep-Alive" in your first curl logging message, who adds this header.
So only I could not find this much difference, please try to run with debug option and check log.
Thanks in advance for your help.
@anaelcarvalho commented on GitHub (Jan 11, 2016):
@ggtakec
After debugging further, I found that your suspicion is correct - the connection is in fact being routed through a proxy due to unavailability of the VPC Endpoint in this region (SA).
Turns out that the proxy being used (Squid) requires the 'Content-Length' header parameter in POST requests until version 3.1.10; this requirement being dropped from 3.1.11 onwards.
We will upgrade the proxy version and retest, but I expect that this should do it.
Thank you!
@anaelcarvalho commented on GitHub (Jan 11, 2016):
Retested with new proxy and fixed. Closing issue.
@ggtakec commented on GitHub (Jan 16, 2016):
@anaelcarvalho thanks for checking your proxy.