question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error uploading large files to MinIO server

See original GitHub issue

Expected Behavior

upload successful

Current Behavior

MinIO API responded with message=The request signature we calculated does not match the signature you provided. Check your key and signing method.

Steps to Reproduce (for bugs)

c# client, verson 3.0.12 latest docker server this is my code:

public async Task UploadFile(string bucketName, Stream fileStream, string fileName, long fileSize, string contentType)
{
            bool found = await minioClient.BucketExistsAsync(bucketName);
            if (!found)
            {
                await minioClient.MakeBucketAsync(bucketName);
            }
            // Upload a file to bucket.
            await minioClient.PutObjectAsync(bucketName, fileName, fileStream, fileSize, contentType);
}

where: bucketName : “patients” stream : the resulting stream from an upload to a asp.net web page fileSize: 19589050 content-type: “application/pdf”

it works fine with smallest PDF files (40KB, 100KB) but if i try to upload biggest files (20 MB for example) i have this exception:

MinIO API responded with message=The request signature we calculated does not match the signature you provided. Check your key and signing method.

STACKTRACE:

in Minio.MinioClient.ParseError(IRestResponse response) in Minio.MinioClient.<>c.<.ctor>b__80_0(IRestResponse response) in Minio.MinioClient.HandleIfErrorResponse(IRestResponse response, IEnumerable`1 handlers, DateTime startTime) in Minio.MinioClient.d__84.MoveNext() — Fine traccia dello stack da posizione precedente dove è stata generata l’eccezione — in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in Minio.MinioClient.d__20.MoveNext() — Fine traccia dello stack da posizione precedente dove è stata generata l’eccezione — in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) in Minio.MinioClient.d__15.MoveNext() — Fine traccia dello stack da posizione precedente dove è stata generata l’eccezione — in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in System.Runtime.CompilerServices.TaskAwaiter.GetResult() in API.Managers.MinIOManager.d__5.MoveNext() in C:\Users\dcalzetta\source\repos\TPO_Web\API\Managers\MinIOManager.cs:riga 43 — Fine traccia dello stack da posizione precedente dove è stata generata l’eccezione — in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in System.Runtime.CompilerServices.TaskAwaiter.GetResult() in API.Controllers.DocumentController.d__7.MoveNext() in C:\Users\dcalzetta\source\repos\TPO_Web\API\Controllers\DocumentController.cs:riga 288

where i’m wrong?

i’m using a docker MINIO server for develompent scope, minio/minio latest 77a8467ccda1 8 days ago 63.5MB

docker run -d -p 9000:9000 -v /opt/minio/data:/data --restart unless-stopped -e "MINIO_ACCESS_KEY=xxxxxxx" -e "MINIO_SECRET_KEY=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" minio/minio server /data

I also tryed some variants, but the error is the same

  • creating self signed certificates on server a conneting the client WithSSL()
  • using server side encryption and not
  • adding or not metatadata to files
  • changing the content type form “applitcation/pdf” to “octect/stream”

Configuration of my ASP.NET application in my web.config i extended max upload size to 100Mb,

<system.web>
  <compilation debug="true" targetFramework="4.6.2" />
  <httpRuntime targetFramework="4.6.1" maxRequestLength="102428" />
</system.web>

...

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="102428800" />
    </requestFiltering>
  </security>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danilonetcommented, Sep 12, 2019

I found the problem by myself! The problem is the RestSharp version, i was using the latest 106.6.10 and with this RestSharp installed on my project the upload fails. Then I tryed to downgrading step by step, and with the RestSharp to version 106.4.2 (and lower) the upload works without errors!

Then, i preferr to work with the latest RestSharp 106.6.10, can you fix this problem on the Minio c# client?

here you can find a Sample console application visual studio Project that has the error, https://1drv.ms/u/s!AnF_YQvROGqPgrsrebBvnbZgmLzXTw?e=sM9cQr

1reaction
nitishtcommented, Aug 23, 2019

Thanks for reporting @danilonet we’ll take a look

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error uploading large files to MinIO server
it works fine with smallest PDF files (40KB, 100KB) but if i try to upload biggest files (20 MB for example) i have...
Read more >
Upload file in minio and got 413 error (Request Entity Too ...
i use minio connect to your dns service. when, I open website with my IP. I can upload file size larger than 1...
Read more >
Unable to upload bigger then 8MB file in Minio S3 storage
i have configured S3 minio and connected to nextcloud as default storage, when I upload file in s3 bucket I face no issue,...
Read more >
Mender-proxy/deployments unable to upload files to minio
Hello everyone, beginning this week i've made a second mender-server to test the new 2.3 and migrate my 1.8 to it.
Read more >
I can't upload the file to the MINIO bucket! : r/golang
File from the handler and uploads it to the MINIO bucket. but every time I upload a file this error is shown and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found