apache/dolphinscheduler · error · IllegalArgumentException
bucketName: <bucketName> is not exists, you need to create t
Error message
bucketName: <bucketName> is not exists, you need to create them by yourself
What it means
After confirming the OSS bucket name is non-blank, OssRemoteLogHandler.checkBucketNameExists calls ossClient.doesBucketExist(bucketName). If Alibaba Cloud OSS reports the bucket does not exist (under the configured credentials/endpoint), the handler throws this IllegalArgumentException instead of failing later at log upload time.
Source
Thrown at dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/OssRemoteLogHandler.java:103
log.error("error while getting remote log on OSS {} to {}", objectName, logPath, e);
}
}
@Override
public void close() throws IOException {
if (ossClient != null) {
ossClient.shutdown();
}
}
private void checkBucketNameExists(String bucketName) {
if (StringUtils.isBlank(bucketName)) {
throw new IllegalArgumentException(Constants.REMOTE_LOGGING_OSS_BUCKET_NAME + " is empty");
}
boolean existsBucket = ossClient.doesBucketExist(bucketName);
if (!existsBucket) {
throw new IllegalArgumentException(
"bucketName: " + bucketName + " is not exists, you need to create them by yourself");
}
log.info("bucketName: {} has been found", bucketName);
}
private String readOssAccessKeyId() {
return PropertyUtils.getString(Constants.REMOTE_LOGGING_OSS_ACCESS_KEY_ID);
}
private String readOssAccessKeySecret() {
return PropertyUtils.getString(Constants.REMOTE_LOGGING_OSS_ACCESS_KEY_SECRET);
}
private String readOssEndpoint() {
return PropertyUtils.getString(Constants.REMOTE_LOGGING_OSS_ENDPOINT);
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Create the bucket in the Alibaba Cloud OSS console (or via ossutil: ossutil mb oss://<bucket>) exactly matching remote.logging.oss.bucket.name — DolphinScheduler does not auto-create it
- Fix typos in remote.logging.oss.bucket.name in common.properties
- Align remote.logging.oss.endpoint with the region where the bucket actually exists
- Verify remote.logging.oss.access-key-id/secret-key belong to the account that owns the bucket
Example fix
// before remote.logging.oss.bucket.name=dolphinscheduler-log // bucket 'dolphinscheduler-log' does not exist // after $ ossutil mb oss://dolphinscheduler-log --region cn-hangzhou remote.logging.oss.bucket.name=dolphinscheduler-log remote.logging.oss.endpoint=oss-cn-hangzhou.aliyuncs.com
Defensive patterns
Strategy: validation
Validate before calling
// pre-check with the OSS SDK before starting the handler
boolean exists = ossClient.doesBucketExist(bucketName);
if (!exists) {
throw new IllegalStateException("OSS bucket " + bucketName + " does not exist; create it first (ossutil mb oss://" + bucketName + ")");
} Try / catch
try {
ossRemoteLogHandler.checkBucketNameExists(bucketName);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("is not exists")) {
log.error("Bucket {} missing: create it or fix endpoint/credentials", bucketName);
}
} Prevention
- Create the bucket via IaC (Terraform/ossutil) before deploying DolphinScheduler
- Keep endpoint region and bucket region consistent
- Verify credentials can head the bucket with ossutil ls oss://<bucket>
- Use exact bucket names from your cloud inventory, not memory
When it happens
Trigger: checkBucketNameExists is called with a well-formed non-blucket name that does not exist: the bucket was never created, was deleted, belongs to another account/region, or the endpoint/credentials point to a different tenant so doesBucketExist returns false.
Common situations: Typo in remote.logging.oss.bucket.name; bucket created in a different region than remote.logging.oss.endpoint; using credentials of an account that does not own the bucket; bucket name violating OSS naming rules so it was never successfully created.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- bucketName: ${bucketName} is not exists, you need to create
- remote.logging.oss.bucket.name is empty
- bucketName: <bucketName> is not exists, you need to create t
- bucketName: ${bucketName} is not exists, you need to create
- directory: ${directory} already exists
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/1973d7933c1ce881.
Report an issue: GitHub.