【 使用环境 】生产环境
【 OB or 其他组件 】Oceanbase CE
【 使用版本 】 4.3.5.2
【问题描述】
设置 Oceanbase 的日志归档路径为 Cloudflare R2 对象存储时:
ALTER SYSTEM SET LOG_ARCHIVE_DEST='LOCATION=s3://oceanbase-TENANT-backup/backup/log?host=CLOUDFLARE-R2-ID.r2.cloudflarestorage.com/&access_id=CLOUDFLARE——ACCESS_ID&access_key=CLOUDFLARE——ACCESS_KEY&delete_mode=delete&checksum_type=md5&addressing_model=path_style' TENANT=TENANT;
出现:
ERROR 9129 (HY000): object storage io error
查看observer.log 日志,给出报错是证书错误:
[2025-06-20 07:59:39.141688] WDIAG Log (ob_storage_s3_base.cpp:116) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=10][errcode=-9129] [S3] module=CurlHttpClient, msg=Curl returned error
code 77 - Error
[2025-06-20 07:59:39.141736] WDIAG Log (ob_storage_s3_base.cpp:116) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=8][errcode=-9129] [S3] module=AWSXmlClient, msg=HTTP response code: -1
Resolved remote host IP address: 172.66.1.46
Request ID:
Exception name:
Error message: curlCode: 77, Error
9 response headers:
cache-control : max-age=3600
cf-ray : 9529ba5d79377cf5-LAX
connection : keep-alive
content-length : 167
content-type : text/html
date : Fri, 20 Jun 2025 07:59:39 GMT
expires : Fri, 20 Jun 2025 08:59:39 GMT
location : https://CLOUDFLARE-R2-ID.r2.cloudflarestorage.com/oceanbase-TENAT-backup?max-keys=1000&prefix=backup%2Flog%2F
server : cloudflare
[2025-06-20 07:59:39.141760] WDIAG Log (ob_storage_s3_base.cpp:116) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=5][errcode=-9129] [S3] module=AWSClient, msg=If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
[2025-06-20 07:59:39.141779] WDIAG is_timeout_ (ob_object_storage_base.h:111) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=6][errcode=-4012] request reach time limit(start_time_us_=1750406357549931, timeout_us_=20000000, cur_time_us=1750406379141779, attempted_retries=11)
[2025-06-20 07:59:39.141786] WDIAG log_s3_status (ob_storage_s3_base.cpp:843) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=5][errcode=-9129] S3 info(request_id="", code=-1, exception="", err_msg="curlCode: 77, Error")
[2025-06-20 07:59:39.141790] WDIAG do_list_ (ob_storage_s3_base.cpp:1298) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=3][errcode=-9129] failed to list s3 objects(ret=-9129, bucket=oceanbase-TENANT, object=backup/log/, max_list_num=1000, delimiter=NULL)
[2025-06-20 07:59:39.141798] WDIAG list_files_ (ob_storage_s3_base.cpp:1861) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=6][errcode=-9129] fail to list s3 objects(ret=-9129, uri=s3://oceanbase-TENANT-backup/backup/log/)
[2025-06-20 07:59:39.141804] WDIAG [STORAGE] list_files (ob_storage.cpp:945) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=2][errcode=-9129] fail to list files(ret=-9129, uri=s3://oceanbase-TENANT-backup/backup/log)
[2025-06-20 07:59:39.141808] WDIAG [STORAGE] print_access_storage_log_ (ob_i_storage.cpp:912) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=3][errcode=-9129] access object storage cost too much time: list_files (ob_storage.cpp:928), uri=s3://oceanbase-TENAT-backup/backup/log, size=0 byte, start_time=1750406357549303, cost_ts=21592505 us, speed=0.00 MB/s, is_slow=1
[2025-06-20 07:59:39.141816] WDIAG inner_scan_dir_ (ob_object_device.cpp:790) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=6][errcode=-9129] fail to do list/dir scan!(ret=-9129, dir_name=s3://oceanbase-TENAT-backup/backup/log, is_dir_scan=false, is_marker_scan=false)
[2025-06-20 07:59:39.141824] WDIAG is_empty_directory (ob_backup_io_adapter.cpp:1281) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=6][errcode=-9129] fail to scan dir!(ret=-9129, ret="OB_OBJECT_STORAGE_IO_ERROR", uri=s3://oceanbase-TENAT-backup/backup/log, storage_info={endpoint "host=CLOUDFLARE-R2-ID.r2.cloudflarestorage.com/", access_id:"access_id=CLOUDFLARE-ACCESS-ID", extension "delete_mode=delete&checksum_type=md5&addressing_model=path_style", type:"S3", checksum_type:1, max_iops:0, max_bandwidth:0, role_arn:0x13a9db3a2a38, external_id:0x13
a9db3a2b38, enable_worm:false}, device_guard={device_handle_:0x13abbfd8dea0, uri_cstr_:s})
[2025-06-20 07:59:39.141846] WDIAG [SHARE] check_dest_validity (ob_backup_store.cpp:449) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=6][errcode=-9129] fail to check dest is empty dir
ctory(ret=-9129, backup_dest={root_path:"s3://oceanbase-TENAT-backup/backup/log", storage_info:{endpoint:"host=CLOUDFLARE-R2-ID.r2.cloudflarestorage.com/", access_id:"access_id=CLOUDFLARE-ACCESS-ID", extension:"delete_mode=delete&checksum_type=md5&addressing_model=path_style", type:"S3", checksum_type:1, max_iops:0, max_bandwidth:0, role_arn:0x13a9db390a38, external_id:0x13a9db390b38, enable_worm:false}})
[2025-06-20 07:59:39.141851] WDIAG [SHARE] check_before_update_inner_config (ob_backup_config.cpp:673) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=3][errcode=-9129] fail to update archive dest config(ret=-9129, tenant_id=1006)
[2025-06-20 07:59:39.141858] WDIAG [SHARE] update_inner_config_table (ob_backup_config.cpp:359) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=5][errcode=-9129] fail to check before update inner config(ret=-9129)
[2025-06-20 07:59:39.141860] WDIAG [RS] admin_set_backup_config (ob_root_service.cpp:11292) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=1][errcode=-9129] fail to update inner config table(ret=-9129)
[2025-06-20 07:59:39.142187] WDIAG [RS] admin_set_config (ob_root_service.cpp:8681) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=3][errcode=-9129] fail to set backup config(ret=-9129, arg={items:[{name:"log_archive_dest", value:"LOCATION=s3://oceanbase-TENAT-backup/backup/log?host=CLOUDFLARE-R2-ID.r2.cloudflarestorage.com/&access_id=CLOUDFLARE-ACCESS-ID&access_key=CLOUDFLARE-ACCESS-KEYf&delete_mode=delete&checksum_type=md5&addressing_model=path_style", comment:"", zone:"", server:"0.0.0.0:0", tenant_name:"TENANT", exec_tenant_id:1, tenant_ids:[], want_to_set_tenant_config:false}], is_inner:false})
[2025-06-20 07:59:39.142214] INFO [SHARE] add_event (ob_event_history_table_operator.h:266) [1607194][T1_L0_G0][T1][YB42C4800102-000637377BFE570B-0-0] [lt=10] event table add task(ret=0, event_table_name="__all_rootservice_event_history", sql=INSERT INTO __all_rootservice_event_history (gmt_create, module, event, name1, value1, name2, value2, name3, value3, value4, value5, value6, rs_svr_ip, rs_svr
_port) VALUES (usec_to_time(1750406379142199), 'root_service', 'admin_set_config', 'ret', -9129, 'arg', '{name:"log_archive_dest", value:"LOCATION=s3://oceanbase-TENAT-backup/backup/log?host=CLOUDFLARE-R2-ID.r2.cloudflarestorage.com/&access_id=CLOUDFLARE-ACCESS-ID&access_key=CLOUDFLARE-ACCESS-KEYf&delete_mode=delete&checksum_type=md5&addressing_model=path_style", comment:"", zone:"", server:"0.0.0.0:0", tenant_name:"sitegroup", exec_tenant_id:1, tenant_ids:[], want_to_set_tenant_config:false}', 'is_inner', 0, '', '', '',
'192.168.1.1', 2882))
使用 s3 客户端访问没问题,aws-sdk-cpp 的证书不是读取系统的吗?但是看前面的curl已经返回 cloduflare 的 server 头应该访问也没问题。
【复现路径】问题出现前后相关操作
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
【备注】基于 LLM 和开源文档 RAG 的论坛小助手已开放测试,在发帖时输入 [@论坛小助手] 即可召唤小助手,欢迎试用!