Skip to content

Some S3 providers are not available #14053

Closed
@88250

Description

@88250
Member

某些 S3 提供商无法使用

upload lock sync failed: operation error S3: PutObject, https response error StatusCode: 400, RequestID: 67AAF92CD4BE203039C9E353, HostID: sunhy-host.oss-cn-beijing.aliyuncs.com, api error InvalidArgument: aws-chunked encoding is not supported with the specified x-amz-content-sha256 value.

AWS SDK 在 v1.33.0 中升级的 checksum 模块 v1.5.0 中引入的一个特性导致了该问题 https://github.com/aws/aws-sdk-go-v2/blob/main/service/internal/checksum/CHANGELOG.md aws/aws-sdk-go-v2#2960

解决方案是禁用校验:

as3.NewFromConfig(cfg, func(o *as3.Options) {
	o.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired
	o.ResponseChecksumValidation = aws.ResponseChecksumValidationWhenRequired
}

Activity

self-assigned this
on Feb 11, 2025
changed the title [-]某些 S3 提供商无法使用问题[/-] [+]某些 S3 提供商无法使用[/+] on Feb 11, 2025
emptylight370

emptylight370 commented on Feb 11, 2025

@emptylight370
Contributor

在14051提到的帖子中,我已经上传了今天的日志,直接引用链滴的文件链接了:siyuan.zip,我整不动了,辛苦D大看看,云服务商是腾讯云。

88250

88250 commented on Feb 11, 2025

@88250
MemberAuthor

先用上个版本顶顶

emptylight370

emptylight370 commented on Feb 11, 2025

@emptylight370
Contributor
shuojie819

shuojie819 commented on Feb 11, 2025

@shuojie819

聊天记录 👇(直接截图感觉不太好就复制上来了)
已知,腾讯云COS、阿里云OSS、缤纷云在HTTPS下无法正常同步,七牛云一切正常

  • https时使用了aws-chunked编码,http时没有使用。
  • 可以解释得通了:Why are S3 trailing checksums only supported over TLS? aws/aws-sdk-go-v2#1667
  • 你们使用思源的快速修复就是改成http协议(而不是https)
  • 看起来不是一个疏漏,是有意为之。
  • 需要继续调研。但它用这种方法可能会让很多S3兼容对象存储都不支持。
  • 我稍微有点怀疑,七牛云并没有识别这个header,算是歪打正着
  • 不过oss不支持,说明对于很多对象存储服务商来说,这种严格的上传是不一定有必要的。
changed the title [-]某些 S3 提供商无法使用[/-] [+]Some S3 providers are not available[/+] on Feb 12, 2025
added this to the 3.1.22 milestone on Feb 12, 2025
emptylight370

emptylight370 commented on Feb 12, 2025

@emptylight370
Contributor

所以下一个dev版有修复吗

88250

88250 commented on Feb 12, 2025

@88250
MemberAuthor

对,下午发个 dev 版

21 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@emptylight370@shuojie819@TCOTC@ethan-bitiful

      Issue actions

        Some S3 providers are not available · Issue #14053 · siyuan-note/siyuan