apache/dolphinscheduler · error · IllegalArgumentException
remote.logging.cos.bucket.name is empty
Error message
remote.logging.cos.bucket.name is empty
What it means
CosRemoteLogHandler.checkBucketNameExists() validates Tencent COS remote-logging configuration. If remote.logging.cos.bucket.name is blank it throws IllegalArgumentException (the constant name plus ' is empty') because remote log upload has no target bucket.
Source
Thrown at dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/CosRemoteLogHandler.java:102
try {
log.info("get remote log from tencent cos {} to {}", objectName, logPath);
cosClient.getObject(new GetObjectRequest(bucketName, objectName), new File(logPath));
} catch (Exception e) {
log.error("error while sending remote log from {} to tencent cos {}, reason:", objectName, logPath, e);
}
}
@Override
public void close() throws IOException {
if (cosClient != null) {
cosClient.shutdown();
}
}
private void checkBucketNameExists(String bucketName) {
if (StringUtils.isBlank(bucketName)) {
throw new IllegalArgumentException(Constants.REMOTE_LOGGING_COS_BUCKET_NAME + " is empty");
}
boolean existsBucket = cosClient.doesBucketExist(bucketName);
if (!existsBucket) {
throw new IllegalArgumentException(
"bucketName: " + bucketName + " does not exists, you should create it first");
}
log.debug("tencent cos bucket {} has been found for remote logging", bucketName);
}
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Set remote.logging.cos.bucket.name to your existing COS bucket name in the remote-logging config.
- Confirm the property is actually loaded (correct key, file on classpath, no leading whitespace-only value).
- If the bucket was deleted, recreate it in Tencent COS or point the config at an existing bucket.
Example fix
// before remote.logging.cos.bucket.name= // after remote.logging.cos.bucket.name=dolphinscheduler-logs-1250000000
Defensive patterns
Strategy: validation
Validate before calling
String bucket = config.getRemoteLoggingCosBucketName();
if (StringUtils.isBlank(bucket)) {
throw new IllegalArgumentException("remote.logging.cos.bucket.name must be set when COS remote logging is enabled");
} Try / catch
try {
initCosRemoteLogHandler();
} catch (IllegalArgumentException e) {
log.error("COS remote logging misconfigured: {}", e.getMessage());
} Prevention
- Populate remote.logging.cos.bucket.name (and region/keys) before enabling remote logging.
- Run a startup config linter that checks all remote.logging.* fields for the chosen storage type.
- Avoid whitespace-only values in properties files.
When it happens
Trigger: Enabling remote logging with cos as storage type but leaving remote.logging.cos.bucket.name empty in the remote-logging configuration when CosRemoteLogHandler initializes.
Common situations: Config template copied without filling COS bucket; wrong property key so value loads blank; bucket name removed during environment migration.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- remote.logging.abs.container.name is blank
- bucketName: <bucketName> does not exists, you should create
- receivers must not be null
- url can not be null
- headerParams is not a valid json
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/48c05d17382d8c85.
Report an issue: GitHub.