Skip to content

Fail to create buckets in Minio Object Storage due to missing region header #11073

Open
@levindecaro

Description

@levindecaro

problem

Attempting to create buckets on Minio Cluster via ACS resulted in an error due to an invalid authorization header.

2025-06-23 19:19:05,701 DEBUG [o.a.c.s.o.BucketApiServiceImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139, ctx-e514f1d3]) (logid:93e5ca37) Failed to create bucket with name: test-1 com.cloud.utils.exception.CloudRuntimeException: The authorization header is malformed; the region is wrong; expecting 'ap-east-1'.
        at org.apache.cloudstack.storage.datastore.driver.MinIOObjectStoreDriverImpl.createBucket(MinIOObjectStoreDriverImpl.java:125)
        at org.apache.cloudstack.storage.object.store.ObjectStoreImpl.createBucket(ObjectStoreImpl.java:115)
        at org.apache.cloudstack.storage.object.BucketApiServiceImpl.createBucket(BucketApiServiceImpl.java:147)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:105)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
        at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
        at jdk.proxy3/jdk.proxy3.$Proxy442.createBucket(Unknown Source)
        at org.apache.cloudstack.api.command.user.bucket.CreateBucketCmd.execute(CreateBucketCmd.java:188)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:173)
        at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:110)
        at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:652)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
        at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:600)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: error occurred
ErrorResponse(code = AuthorizationHeaderMalformed, message = The authorization header is malformed; the region is wrong; expecting 'ap-east-1'., bucketName = test-1, objectName = null, resource = /test-1, requestId = 184BA7F365D8E2FD, hostId = ece579700584d4239837542582e082c7b7b451a09695091575f9aa679ff22c96)
request={method=PUT, url=https://apac-1a-s3.ap-east-1.example.com/test-1, headers=Host: apac-1a-s3.ap-east-1.example.com
Accept-Encoding: identity
User-Agent: MinIO (Linux; amd64) minio-java/dev
Content-MD5: 1B2M2Y8AsgTpgAmY7PhCfg==
x-amz-content-sha256: UNSIGNED-PAYLOAD
x-amz-date: 20250623T111905Z
Authorization: ██
}
response={code=400, headers=Accept-Ranges: bytes
Content-Length: 409
Content-Type: application/xml
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Bucket-Region: ap-east-1
X-Amz-Id-2: ece579700584d4239837542582e082c7b7b451a09695091575f9aa679ff22c96
X-Amz-Request-Id: 184BA7F365D8E2FD
X-Content-Type-Options: nosniff
X-Ratelimit-Limit: 1605
X-Ratelimit-Remaining: 1605
X-Xss-Protection: 1; mode=block
Date: Mon, 23 Jun 2025 11:19:03 GMT
}

        at io.minio.S3Base$1.onResponse(S3Base.java:690)
        at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
        ... 3 more

2025-06-23 19:19:05,703 WARN  [o.a.c.m.w.WebhookServiceImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139, ctx-e514f1d3]) (logid:93e5ca37) Skipping delivering event Event {"description":"{\"details\":\"Bucket Id: f88ce50f-9afa-4188-aeba-d521f1195d58\",\"event\":\"BUCKET.CREATE\",\"status\":\"Completed\"}","eventId":null,"eventType":"BUCKET.CREATE","eventUuid":null,"resourceType":"Bucket","resourceUUID":null} to any webhook as account ID is missing
2025-06-23 19:19:05,703 WARN  [o.a.c.f.e.EventDistributorImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139, ctx-e514f1d3]) (logid:93e5ca37) Failed to publish event [category: ActionEvent, type: BUCKET.CREATE] on bus webhookEventBus
2025-06-23 19:19:05,709 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Complete async job-137139, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"530","errortext":"Failed to create bucket with name: test-1. The authorization header is malformed; the region is wrong; expecting 'ap-east-1'."}
2025-06-23 19:19:05,710 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Publish async job-137139 complete on message bus
2025-06-23 19:19:05,710 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Wake up jobs related to job-137139
2025-06-23 19:19:05,710 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Update db status for job-137139
2025-06-23 19:19:05,711 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Wake up jobs joined with job-137139 and disjoin all subjobs created from job- 137139
2025-06-23 19:19:05,715 DEBUG [c.c.a.ApiServer] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Retrieved cmdEventType from job info: BUCKET.CREATE
2025-06-23 19:19:05,716 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl$5] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Done executing org.apache.cloudstack.api.command.user.bucket.CreateBucketCmd for job-137139
2025-06-23 19:19:05,717 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-86:[ctx-5f0c251b, job-137139]) (logid:93e5ca37) Remove job-137139 from job monitoring

versions

ACS: 4.20.1
OS: OL9 x86_64
hypervisors: KVM
storage: NFS
network: vxlan

The steps to reproduce the bug

  1. Configure Object Storage Provider
  2. Create buckets

What to do about it?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions