首批通过分布式安全可靠测评,为关键业务系统打造
配置 S3 备份路径时出现 NoSuchBucket 报错,实际 Bucket 存在
更新时间:2026-07-17 07:16
问题现象
配置 S3 存储(Dell PowerScale)设置备份路径时,实际存在 Bucket,却报错 ERROR 9118 (HY000): object storage endpoint is invalid。
mysql> ALTER SYSTEM SET log_archive_dest = 'LOCATION=s3://dba-ob-backup/data/public_prod_xxxx/xxxxx/tenant_incarnation_1/1002/clog?host=system.xxxxx-xxxxx-xxxxxxx.xxxxxxx.org:9020&access_id=dba-ob-backup_acc&access_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=null' TENANT = 'xxxxxxx_public';
ERROR 9118 (HY000): object storage endpoint is invalid
关键日志信息如下:
[2026-02-26 11:51:28.724115] WDIAG Log (ob_storage_s3_base.cpp:69) [2653140][T1_L0_G0][T1][xxxxxx-xxxxxx-xxxxxx-xxxxxx] [lt=10][errcode=-9105] [S3] module=AWSErrorMarshaller, msg=Encountered AWSError 'NoSuchBucket': The specified bucket does not exist.
[2026-02-26 11:51:28.724209] WDIAG Log (ob_storage_s3_base.cpp:69) [2653140][T1_L0_G0][T1][xxxxxx-xxxxxx-xxxxxx-xxxxxx] [lt=5][errcode=-9105] [S3] module=AWSClient, msg=If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
[2026-02-26 11:51:28.724254] WDIAG log_s3_status (ob_storage_s3_base.cpp:664) [2653140][T1_L0_G0][T1][xxxxxx-xxxxxx-xxxxxx-xxxxxx] [lt=4][errcode=-9118] S3 info(request_id="", code=404, exception="NoSuchBucket", err_msg="The specified bucket does not exist.")
问题原因
OceanBase 使用 AWS S3 SDK 发起请求时,SDK 将 Bucket 名 dba-ob-backup 拼接到 HostName 前面,实际访问的是 dba-ob-backup.system.xxxxx-xxxxx-xxxxxxx.xxxxxxx.org:902,而 Dell PowerScale 存储的 S3 网关不支持这种虚拟托管式寻址,无法识别该子域名下的 Bucket,对于用户自建对象存储采用域名 + 端口号的方式,是不支持 Virtual Host 模式(默认模式,通过 addressing_model 指定),因此返回 HTTP 404 + NoSuchBucket。而 AWS CLI 在使用自定义 endpoint(--endpoint-url)时,默认采用 Path-Style,所以请求格式正确,能正常访问。需在执行 ob_admin 时加上 addressing_model=path_style。
问题的风险及影响
配置备份失败。
适用版本
OceanBase 数据库 V4.x 版本。
解决方法
在配置路径时需要指定 addressing_model=path_style。
规避方式
无。