minio报错:io.minio.errors.ErrorResponseException: The specified bucket does not exist

mimio报错

io.minio.errors.ErrorResponseException: The specified bucket does not exist
	at io.minio.MinioClient.execute(MinioClient.java:1201)
	at io.minio.MinioClient.updateRegionCache(MinioClient.java:1216)
	at io.minio.MinioClient.getRegion(MinioClient.java:1262)
	at io.minio.MinioClient.executePut(MinioClient.java:1390)
	at io.minio.MinioClient.putObject(MinioClient.java:3688)
	at io.minio.MinioClient.putObject(MinioClient.java:3728)
	at io.minio.MinioClient.putObject(MinioClient.java:3244)

解决办法

其实报错结果说的很明白了,指定的桶是不存在的,要么你把桶名写错了,要么没有创建桶。

  1. 1.打开minio后台,右下角创建桶即可。
  2. 2.mc命令创建桶
./mc mb play/桶名
Bucket created successfully `play/桶名`.
  1. 3.代码创建
try
{
   // 判断存储桶是否存在
   bool found = await minioClient.BucketExistsAsync("mybucket");
   if (found)
   {
      Console.Out.WriteLine("mybucket already exists");
   }
   else
   {
     // 创建桶
     await minioClient.MakeBucketAsync("mybucket");
     Console.Out.WriteLine("mybucket is created successfully");
   }
}
catch (MinioException e)
{
   Console.Out.WriteLine("Error occurred: " + e);
}

推荐在后台创建。

其他报错:Invalid Request

# minio   error  

评论

企鹅群:39438021

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×