PutObjectRequest::PutObject fails with WinHttpSendRequest error code ERROR_INVALID_PARAMETER
poyen-wu opened this issue · 4 comments
Describe the bug
PutObjectRequest::PutObject
consistently fails with WinHttpSendRequest
error code ERROR_INVALID_PARAMETER
.
Expected Behavior
PutObjectRequest finish without error.
Current Behavior
amz-sdk-request: attempt=10; max=11
authorization: AWS4-HMAC-SHA256 Credential=PVGGHVRLNRDRW4M2XH7H/20240629/ca-central-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date, Signature=5fc5fb8d5e4ef963ebefc4b03d0526de09997b2b657612454c09c82387f246a4
content-length: 7,458,816
content-md5: ifnq0G1WrsuGU3B03IocGw==
content-type: binary/octet-stream
host: s3.ca-central-1.wasabisys.com
user-agent: aws-sdk-cpp/1.11.359 ua/2.0 md/aws-crt#0.27.0 os/Windows#10.0.22621.3374 md/arch#AMD64 lang/c++#C++199711L md/MSVC#1938 cfg/retry-mode#default api/S3
x-amz-content-sha256: UNSIGNED-PAYLOAD
x-amz-date: 20240629T084028Z
[ERROR] 2024-06-29 08:40:28.220 WinHttp [14156] Failed to WinHttpSendRequest with an error code: ERROR_INVALID_PARAMETER
[INFO] 2024-06-29 08:40:28.220 WinHttpSyncHttpClient [14156] Actual HTTP Version used 1.1 or 1.0
[WARN] 2024-06-29 08:40:28.220 WinHttpSyncHttpClient [14156] Send request failed: Windows/WinHTTP error code is 0:
[DEBUG] 2024-06-29 08:40:28.220 WinHttpSyncHttpClient [14156] Closing http request handle 0,000,02A,7BB,395,140
[DEBUG] 2024-06-29 08:40:28.220 WinHttpSyncHttpClient [14156] Releasing connection handle 0,000,02A,7BB,3B2,A30
[DEBUG] 2024-06-29 08:40:28.220 WinHttpConnectionPoolMgr [14156] Releasing connection to endpoint s3.ca-central-1.wasabisys.com:443
[DEBUG] 2024-06-29 08:40:28.220 AWSClient [14156] Request returned error. Attempting to generate appropriate error codes from response
[ERROR] 2024-06-29 08:40:28.220 AWSXmlClient [14156] HTTP response code: -1
Resolved remote host IP address:
Request ID:
Exception name:
Error message: Encountered network error when sending http request
0 response headers:
[WARN] 2024-06-29 08:40:28.220 AWSClient [14156] If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
[DEBUG] 2024-06-29 08:40:28.220 AWSClient [14156] Date header was not found in the response, can't attempt to detect clock skew
[WARN] 2024-06-29 08:40:28.220 AWSClient [14156] Request failed, now waiting 12,800 ms before attempting again.
[DEBUG] 2024-06-29 08:40:41.060 AWSAuthV4Signer [14156] Note: Http payloads are not being signed. signPayloads=0 http scheme=https
[DEBUG] 2024-06-29 08:40:41.060 AWSAuthV4Signer [14156] Canonical Header String: amz-sdk-invocation-id:52858BF2-5F1D-4C02-A0A9-E81B25E0BAA4
amz-sdk-request:attempt=11; max=11
content-length:7,458,816
content-md5:ifnq0G1WrsuGU3B03IocGw==
content-type:binary/octet-stream
host:s3.ca-central-1.wasabisys.com
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20240629T084041Z
[DEBUG] 2024-06-29 08:40:41.060 AWSAuthV4Signer [14156] Signed Headers value:amz-sdk-invocation-id;amz-sdk-request;content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date
[DEBUG] 2024-06-29 08:40:41.060 AWSAuthV4Signer [14156] Canonical Request String: PUT
/worker-backup.poyen.me/WasabiWorker.pdb
amz-sdk-invocation-id:52858BF2-5F1D-4C02-A0A9-E81B25E0BAA4
amz-sdk-request:attempt=11; max=11
content-length:7,458,816
content-md5:ifnq0G1WrsuGU3B03IocGw==
content-type:binary/octet-stream
host:s3.ca-central-1.wasabisys.com
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20240629T084041Z
amz-sdk-invocation-id;amz-sdk-request;content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD
[DEBUG] 2024-06-29 08:40:41.060 AWSAuthV4Signer [14156] Final String to sign: AWS4-HMAC-SHA256
20240629T084041Z
20240629/ca-central-1/s3/aws4_request
d1f19ef4e84db9731d68ae700bf1114f4e9961f612ac5860fba15d2bd676cd8c
[DEBUG] 2024-06-29 08:40:41.060 AWSAuthV4Signer [14156] Final computed signing hash: 6a11f176247701ffca169acb38fda1d0b739e995bbb10c62dfc799ef1efdfde4
[DEBUG] 2024-06-29 08:40:41.060 AWSAuthV4Signer [14156] Signing request with: AWS4-HMAC-SHA256 Credential=PVGGHVRLNRDRW4M2XH7H/20240629/ca-central-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date, Signature=6a11f176247701ffca169acb38fda1d0b739e995bbb10c62dfc799ef1efdfde4
[DEBUG] 2024-06-29 08:40:41.060 AWSClient [14156] Request Successfully signed
[INFO] 2024-06-29 08:40:41.060 WinHttpConnectionPoolMgr [14156] Attempting to acquire connection for s3.ca-central-1.wasabisys.com:443
[DEBUG] 2024-06-29 08:40:41.060 WinHttpConnectionPoolMgr [14156] Pool found, reusing
[INFO] 2024-06-29 08:40:41.060 WinHttpConnectionPoolMgr [14156] Connection now available, continuing.
[DEBUG] 2024-06-29 08:40:41.060 WinHttpConnectionPoolMgr [14156] Returning connection handle 0,000,02A,7BB,3B2,A30
[DEBUG] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] Acquired connection 0,000,02A,7BB,3B2,A30
[DEBUG] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] AllocateWindowsHttpRequest returned handle 0,000,02A,7BB,391,060
[DEBUG] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] with headers:
[DEBUG] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] amz-sdk-invocation-id: 52858BF2-5F1D-4C02-A0A9-E81B25E0BAA4
amz-sdk-request: attempt=11; max=11
authorization: AWS4-HMAC-SHA256 Credential=PVGGHVRLNRDRW4M2XH7H/20240629/ca-central-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date, Signature=6a11f176247701ffca169acb38fda1d0b739e995bbb10c62dfc799ef1efdfde4
content-length: 7,458,816
content-md5: ifnq0G1WrsuGU3B03IocGw==
content-type: binary/octet-stream
host: s3.ca-central-1.wasabisys.com
user-agent: aws-sdk-cpp/1.11.359 ua/2.0 md/aws-crt#0.27.0 os/Windows#10.0.22621.3374 md/arch#AMD64 lang/c++#C++199711L md/MSVC#1938 cfg/retry-mode#default api/S3
x-amz-content-sha256: UNSIGNED-PAYLOAD
x-amz-date: 20240629T084041Z
[ERROR] 2024-06-29 08:40:41.060 WinHttp [14156] Failed to WinHttpSendRequest with an error code: ERROR_INVALID_PARAMETER
[INFO] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] Actual HTTP Version used 1.1 or 1.0
[WARN] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] Send request failed: Windows/WinHTTP error code is 0:
[DEBUG] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] Closing http request handle 0,000,02A,7BB,391,060
[DEBUG] 2024-06-29 08:40:41.060 WinHttpSyncHttpClient [14156] Releasing connection handle 0,000,02A,7BB,3B2,A30
[DEBUG] 2024-06-29 08:40:41.060 WinHttpConnectionPoolMgr [14156] Releasing connection to endpoint s3.ca-central-1.wasabisys.com:443
[DEBUG] 2024-06-29 08:40:41.060 AWSClient [14156] Request returned error. Attempting to generate appropriate error codes from response
[ERROR] 2024-06-29 08:40:41.060 AWSXmlClient [14156] HTTP response code: -1
Resolved remote host IP address:
Request ID:
Exception name:
Error message: Encountered network error when sending http request
0 response headers:
[WARN] 2024-06-29 08:40:41.060 AWSClient [14156] If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
[DEBUG] 2024-06-29 08:40:41.060 AWSClient [14156] Date header was not found in the response, can't attempt to detect clock skew
Reproduction Steps
This can be reproduced with the example code "Upload a string to a bucket".
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.359
Compiler and Version used
Visual Studio
Operating System and version
Windows 11
host: s3.ca-central-1.wasabisys.com
is this a wasabi hosted bucket? does the same request fail with aws s3?
Reproduction Steps
This can be reproduced with the example code "Upload a string to a bucket".
please provide a minimal reproducible example. we run a lot of daily tests on s3 many of which test putobject in different scenarios.
Hi @sbiscigl, thanks for the reply!
It turned out this only happens when a UTF-8 locale is used.
Please feel free to close this issue if UTF-8 locale is not officially supported by AWS SDK.
Closing this as we don't support UTF-8 locale.
This was discussed back in 2017: #749
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.