Doris connect remote S3 storage failed:
ERROR 1105 (HY000): errCode = 2, detailMessage = Failed to create repository: connect to s3 failed: Unable to marshall request to JSON: host must not be null.
Create repository successfully
The S3 SDK uses virtual-hosted style by default. However, some object storage systems (such as MinIO) may not enable or do not support access to virtual-hosted style. At this time, we can add the use_path_style
parameter to force the path style:
CREATE RESOURCE "remote_s3"
PROPERTIES
(
"type" = "s3",
"s3.endpoint" = "bj.s3.com",
"s3.region" = "bj",
"s3.bucket" = "test-bucket",
"s3.root.path" = "path/to/root",
"s3.access_key" = "bbb",
"s3.secret_key" = "aaaa",
"s3.connection.maximum" = "50",
"s3.connection.request.timeout" = "3000",
"s3.connection.timeout" = "1000",
"use_path_style" = "true"
);
Remote storage documentation can be found at: https://doris.apache.org/docs/dev/table-design/tiered-storage/remote-storage