randomly SignatureDoesNotMatch error on upload large file (>50MB)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
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
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:
- Export AWS access keys
- 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 - 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()
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tus/tusd
-
Upload-Concat partial URLs are not parsed as URLs (404 with -base-path / and with query strings)Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
handler: data race on `ctx.body`, and an interruption before the body is set up is lostMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
C Implementation?Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 8/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
projectcalico/calico#14766 ·
Maintainers usually reply within 1 day
-
forward/review service/container
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hashicorp/terraform-provider-google#30852 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100