ES 1.3.1 testing against a Minio S3-compatible storage server - please help #188
Replies: 2 comments 1 reply
-
I tried the example from the S3 section of the documentation: @Test
void test1() {
//Set up the S3 client as per AWS SDK
var s3Client = S3Client.builder()
.region(Region.AWS_ISO_GLOBAL)
.endpointOverride(URI.create("http://127.0.0.1:9000")) //Minio local API endpoint
.credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("yyy", "xxx")))
.build();
//Prove that it works!
var buckets= s3Client.listBuckets().buckets();
//Try to launch emnbedded stoarge manager
var blobFileSystem = BlobStoreFileSystem.New( S3Connector.Caching(s3Client));
try(var embeddedStorage = EmbeddedStorage.start(blobFileSystem.ensureDirectoryPath("storage"))) {
embeddedStorage.isActive();
}
} .. and got the same exception! @fh-ms @zdenek-jonas - can you please take a look - it will be so nice of developers can test ES apps with Minio locally? |
Beta Was this translation helpful? Give feedback.
-
Spent some time debugging this - the issues is with this s3Client
.headObject(HeadObjectRequest
.builder()
.bucket("storage")
.key("/")
.build()); In Minio, this results in 400 Bad head request, and there is no way ES can be told to stop ensuring things this way! A better (and more compatible) way to ensure that "directory" exists is this: s3Client
.putObject(PutObjectRequest
.builder()
.bucket("storage")
.key("/")
.build(), RequestBody.empty()); I verified it works with Minio, and I am sure it also works with AWS S3. Can you please fix ES 1.3.1? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to test ES 1.3.1 (with AWS Java SDK 2.25.18) against a local Minio server - a highly compatible AWS S3 storage server, widely for local development/testing of S3.
This setup code:
generates the following exeception:
Am I setting up the embedded store manager correctly? In my code, you will see that I list the available buckets from the Minio server, so I know the S3Client connection is working fine. What am I missing?
In the Minio WEB UI admin console I see these traces:
Beta Was this translation helpful? Give feedback.
All reactions