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.

I would like to configure Sleet to use Minio as a local S3 compliant object store

See original GitHub issue

Summary

I would like to configure Sleet to use Minio as a local S3 compliant object store but I cannot make it work. This issue may be caused by my ignorance. I will pull source and debug.

Steps to Reproduce

NOTE: Performed on Fedora 31. I manually built everything in an effort to exercise available Sleet and Minio documentation.

  • Employed:
    • https://play.min.io:9000 as S3 service endpoint; accessKeyId=Q3AM3UQ867SPQQA43P2F;secretAccessKey=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
    • mcr.microsoft.com/dotnet/core/sdk:3.1-alpine3.11 Docker image/OCI image

NOTE: This is a public sandbox and publicly documented access key and secret key

  1. Build a local dotNET Core 3.1 OCI container image (I use Podman)
  2. Run dotNET Core container interactively
  3. Install Sleet. In container, dotnet tool install -g sleet -v q and export PATH="$PATH:/root/.dotnet/tools"
  4. Create Sleet config. In container, sleet createconfig --s3
  5. Modify and save sleet.config. In container, vi sleet.config, change content as specified below, and save changes.
{                                                                                                                                                                                                                                                                               
  "username": "devops",                                                                                                                                                                                                                                                      
  "useremail": "devops@example.com",                                                                                                                                                                                                                                            
  "sources": [                                                                                                                                                                                                                                                                  
    {                                                                                                                                                                                                                                                                           
      "name": "myMinioS3Feed",                                                                                                                                                                                                                                                  
      "type": "s3",                                                                                                                                                                                                                                                             
      "path": "https://play.min.io:9000/minio/my-bucket-feed/",                                                                                                                                                                                                                        
      "bucketName": "my-bucket-feed",                                                                                                                                                                                                                                           
      "serviceURL": "https://play.min.io:9000",                                                                                                                                                                                                                                 
      "accessKeyId": "Q3AM3UQ867SPQQA43P2F",                                                                                                                                                                                                                                    
      "secretAccessKey": "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"                                                                                                                                                                         
    }                                                                                                                                                                                                                                                                           
  ]                                                                                                                                                                                                                                                                             
}                                    
  1. Set SLEET_DEBUG=1. In container, export SLEET_DEBUG=1
  2. Initialize feed. In container, sleet init --config sleet.json --source myMinioS3Feed

Expected Results

The feed is successfully initialized.

Actual Results

Exception is thrown.

Amazon.S3.AmazonS3Exception: The AWS Access Key Id you provided does not exist in our records.
 ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
   at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)
   at Amazon.Runtime.Internal.HttpHandler`1.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.RedirectHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.S3.Internal.AmazonS3ResponseHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
   --- End of inner exception stack trace ---
   at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleException(IExecutionContext executionContext, HttpErrorResponseException exception)
   at Amazon.Runtime.Internal.ExceptionHandler`1.Handle(IExecutionContext executionContext, Exception exception)
   at Amazon.Runtime.Internal.ErrorHandler.ProcessException(IExecutionContext executionContext, Exception exception)
   at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Sleet.AmazonS3FileSystemAbstraction.FileExistsAsync(IAmazonS3 client, String bucketName, String key, CancellationToken token) in D:\a\1\s\src\SleetLib\FileSystem\AmazonS3FileSystemAbstraction.cs:line 64
   at Sleet.AmazonS3File.CopyFromSource(ILogger log, CancellationToken token) in D:\a\1\s\src\SleetLib\FileSystem\AmazonS3File.cs:line 40
   at Sleet.FileBase.EnsureFile(ILogger log, CancellationToken token) in D:\a\1\s\src\SleetLib\FileSystem\FileBase.cs:line 289
Failed to sync 'https://play.min.io:9000/my-bucket-feed/sleet.settings.json'. Retrying.

Conclusion

Again, I don’t know if this is my issue or if a code change must be made to allow Sleet to use Minio as an S3 object store. I also reproduced this issue using a local Minio OCI container. I am not a C# developer so I don’t feel confident that I can make a satisfactory code change if this is what is necessary. I will provide user documentation to Sleet and Minio projects if this configuration is possible.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ryancraigcommented, May 15, 2020

Looks like the majority of the changes will be in SleetLib/FileSystem/FileSystemFactory.cs. I’m adding a new type of minio. There’s obviously alot of commonality between s3 and minio. This new type will ensure that I don’t break s3 for Amazon or any other S3 compliant object stores that the current logic handles. It can be refactored later.

1reaction
emgartencommented, May 14, 2020

Thanks for the update @ryancraig, I’ll re-open this for tracking a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running S3 Object Storage Locally with MinIO | by Simon Carr
Creating a new server instance is quite simple. Run the command below in a terminal. ... The first time you run this command,...
Read more >
Transition Objects from MinIO to S3
The procedure on this page creates a new object lifecycle management rule that transition objects from a MinIO bucket to a remote storage...
Read more >
MinIO - Mock S3 in local development
MinIO is a high performance object storage solution that provides an Amazon Web Services S3-compatible API and supports all core S3 features.
Read more >
Self hosted S3 Object Storage with MinIO and Docker
You want to adjust the local directory to any directory you want MinIO save it's configuration and later the bucket data to. Bring...
Read more >
NOOB question Local Install Want to Connect to S3 : r/minio
I can't seem to locate it. Is the primary use case for minio to setup a server and connect it to say S3,...
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