2

I'm trying to create an object in Minio. Sometimes it works and sometimes no.

When I execute :

minioClient.makeBucket(bucketName); // bucketName es a random unique string

I don´t get error, but if If ask Minio if bucket exists:

minioClient.bucketExists(bucketName)

it returns false

After that, If I try to launch once again minioClient.makeBucket(bucketName) because minioClient.bucketExists(bucketName) is returning false, then I get this error (simplified):

BucketAlreadyOwnedByYou

So that, when I get previous error, I try to create object in Minio :

minioClient.putObject(bucketName, objectName, is,null,customMetaData,null, null ); // is is an InputStream of the file I want to store in Minio

But I get this error, saying bucket does not exist;

ErrorResponse(code=NoSuchBucket, message=The specified bucket does not exist, bucketName=888bf891-064f-4270-b0f0-85514c0eae02, objectName=L7aEmF8Ppk, resource=/888bf891-064f-4270-b0f0-85514c0eae02/L7aEmF8Ppk, requestId=16733C7840E6854D, hostId=null)

Any help will be appreciated.

I'm using version 6.0.13 of Minio Java API

Joshua
  • 1,128
  • 3
  • 17
  • 31
Víctor
  • 416
  • 5
  • 15
  • I know nothing about the API or the problem at hand, however - have you tried with Minio 8.2.0? Apparently that's the newest release. Otherwise, [Minio claims to be read-after-write consistent](https://github.com/minio/minio/blob/master/docs/distributed/README.md#consistency-guarantees) so unless this is a huge misconfiguration, you should indeed be able to see the created bucket from the same client that created it, right away. If you can reproduce this with 8.2.0, I'd consider filing an issue to https://github.com/minio/minio-java/. – Petr Janeček Apr 07 '21 at 07:35

1 Answers1

0

This not how MinIO should behave. I have only seen this error where it was either a programming error or a setup error.

When it is a setup error, the root problem is that instead of creating 1 server pool with 4 distributed nodes, people have created 4 server pools each with a single node. This means that when your application gets load balanced, it will sometimes hit the server pool where you created the bucket and sometimes not.

Another cause can be an non-consistent filesystem used as backend. For example NFS with certain settings can have behavior like this. The recommended filesystem is XFS.

Without knowing more about your setup I cannot tell you which one it is.

sh0dan
  • 160
  • 8