randomly SignatureDoesNotMatch error on upload large file (>50MB)

Open
#776 7 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
go
Domain
backend, cloud

Research direction

Reproduce with tusd 1.9.0 using the shown hooks, S3 bucket, and s3-endpoint configuration, then upload a file larger than 50 MB with tuspy and 500000-byte chunks. Start from the PATCH request that fails after roughly 48.5 MB and compare the S3 error with the tusd logs. Done means large uploads complete without SignatureDoesNotMatch and the error details identify the S3 store.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
on upload file (>50MB) raise the error SignatureDoesNotMatch on middle of progess also do not mention s3store on detail.
these are the last 10 tusd's log:

[tusd] 2022/07/25 13:06:02 event="ChunkWriteComplete" id="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" bytesWritten="500000" 

[tusd] 2022/07/25 13:06:02 event="ResponseOutgoing" status="204" method="PATCH" path="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" requestId="" 

[tusd] 2022/07/25 13:06:02 event="RequestIncoming" method="PATCH" path="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" requestId="" 

[tusd] 2022/07/25 13:06:02 event="ChunkWriteStart" id="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" maxSize="500000" offset="48500000" 

[tusd] 2022/07/25 13:06:03.960933 event="HookInvocationStart" type="post-receive" id="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" 

[tusd] 2022/07/25 13:06:03.969287 event="HookInvocationFinish" type="post-receive" id="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" 

[tusd] 2022/07/25 13:06:04.961186 event="HookInvocationStart" type="post-receive" id="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" 

[tusd] 2022/07/25 13:06:04.968753 event="HookInvocationFinish" type="post-receive" id="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" 

[tusd] 2022/07/25 13:06:35 event="ChunkWriteComplete" id="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" bytesWritten="0" 

[tusd] 2022/07/25 13:06:35 event="ResponseOutgoing" status="500" method="PATCH" path="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" error="SignatureDoesNotMatch: 
        status code: 403, request id: tx00000e18bb708b10ffb71-0062de5613-158baee2-default, host id: " requestId=""

To Reproduce
Steps to reproduce the behavior:

  1. Export AWS access keys
  2. Run server: tusd --hooks-http http://127.0.0.1:8000/upload/tusd -s3-bucket=tusd -s3-endpoint=https://s3.ir-thr-at1.arvanstorage.com
  3. Snippet for upload file with tuspy:
from tusclient import client
from tusclient.storage import filestorage

storage = filestorage.FileStorage("storage_file")

my_client = client.TusClient(url="http://0.0.0.0:1080/files/")
my_uploader = my_client.uploader(
    "/path/to/file", # bigger than 50 MB
    chunk_size=500000,
    store_url=True,
    url_storage=storage,
)
my_uploader.upload()

  1. See error on middle of upload prgress:
    [tusd] 2022/07/25 13:06:35 event="ResponseOutgoing" status="500" method="PATCH" path="e4cf9cf969f3d6563d0596747bb6f2a7+2~WSdh726Nr02zF1QhEgGpzWf6B9Lq1QR" error="SignatureDoesNotMatch: status code: 403, request id: tx00000e18bb708b10ffb71-0062de5613-158baee2-default, host id: " requestId=""

Expected behavior
A clear and concise description of what you expected to happen.

Setup details
Please provide following details, if applicable to your situation:

  • Operating System: kubuntu 22.04
  • Used tusd version: 1.9.0
  • Used tusd data storage: AWS S3
  • Used tusd configuration: --hooks-http http://127.0.0.1:8000/upload/tusd -s3-bucket=tusd -s3-endpoint=https://s3.ir-thr-at1.arvanstorage.com
  • Used tus client library: tuspy
Dominant language
Go
Stars
3.9k
Forks
557
Avg merge
3d 1h
Merged PRs (30d)
10

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tus/tusd

All issues in tus/tusd

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.