Skip to content

XAmzContentSHA256Mismatch on CockroachDB Backups #599

@GodTamIt

Description

@GodTamIt

Expected Behavior

I expect this shouldn't fail. This doesn't fail on Cloudflare R2, for example.

Current Behavior

You'll see this error:

closing object: upload failed: XAmzContentSHA256Mismatch: operation error S3: PutObject, https response error StatusCode: 400, RequestID: 1863628D0C2073C9, HostID: , api error XAmzContentSHA256Mismatch: The provided 'x-amz-content-sha256' header does not match what was computed.

Possible Solution

I think this might be an error in how checksums are handled. It may be related to some of the solutions to mitigate cockroachdb/cockroach#115190 as well, which exposes an uncommon code path in the S3 compatibility layer.

Steps to Reproduce

Try setting up Storj as the destination bucket for CockroachDB backups.

Something along the lines of:

CREATE SCHEDULE
  storj_backup
FOR BACKUP INTO
  's3://cockroachdb-backups?AWS_ACCESS_KEY_ID=<redacted>&AWS_SECRET_ACCESS_KEY=<redacted>&AWS_ENDPOINT=https://gateway.storjshare.io&AWS_REGION=storj'
WITH revision_history
RECURRING
  '0 2,19 * * *'
FULL BACKUP
  '@weekly'
WITH SCHEDULE OPTIONS
  first_run = 'now'
;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions