{"record":{"id":"84e23996672a8e4c","repo":"apache/dolphinscheduler","slug":"remote-logging-oss-bucket-name-is-empty","errorCode":null,"errorMessage":"remote.logging.oss.bucket.name is empty","messagePattern":"remote\\.logging\\.oss\\.bucket\\.name is empty","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/OssRemoteLogHandler.java","lineNumber":98,"sourceCode":"\n        try {\n            log.info(\"get remote log on OSS {} to {}\", objectName, logPath);\n            ossClient.getObject(new GetObjectRequest(bucketName, objectName), new File(logPath));\n        } catch (Exception e) {\n            log.error(\"error while getting remote log on OSS {} to {}\", objectName, logPath, e);\n        }\n    }\n\n    @Override\n    public void close() throws IOException {\n        if (ossClient != null) {\n            ossClient.shutdown();\n        }\n    }\n\n    private void checkBucketNameExists(String bucketName) {\n        if (StringUtils.isBlank(bucketName)) {\n            throw new IllegalArgumentException(Constants.REMOTE_LOGGING_OSS_BUCKET_NAME + \" is empty\");\n        }\n\n        boolean existsBucket = ossClient.doesBucketExist(bucketName);\n        if (!existsBucket) {\n            throw new IllegalArgumentException(\n                    \"bucketName: \" + bucketName + \" is not exists, you need to create them by yourself\");\n        }\n\n        log.info(\"bucketName: {} has been found\", bucketName);\n    }\n\n    private String readOssAccessKeyId() {\n        return PropertyUtils.getString(Constants.REMOTE_LOGGING_OSS_ACCESS_KEY_ID);\n    }\n\n    private String readOssAccessKeySecret() {\n        return PropertyUtils.getString(Constants.REMOTE_LOGGING_OSS_ACCESS_KEY_SECRET);\n    }","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/OssRemoteLogHandler.java#L80-L116","documentation":"OssRemoteLogHandler.checkBucketNameExists validates OSS remote-log configuration before use. It throws IllegalArgumentException when the bucket name is blank, mirroring the message \"remote.logging.oss.bucket.name is empty\". The private check runs when the handler verifies the configured Alibaba Cloud OSS bucket exists.","triggerScenarios":"checkBucketNameExists is invoked (during handler init/verification) with a null/empty/whitespace bucketName, i.e. remote.logging.oss.bucket.name is missing or empty in common.properties while OSS remote logging is enabled.","commonSituations":"Setting remote.logging.oss.enable=true without remote.logging.oss.bucket.name; copying an S3 config template and never adding the OSS-specific bucket key; config templating that renders an empty value for the bucket name.","solutions":["Set remote.logging.oss.bucket.name=<your-bucket> in common.properties and restart the service","If the value is set but still blank at runtime, check for env-var substitution or templating failures that render it empty","Disable remote.logging.oss.enable if OSS remote logging is not intended","Pre-create the OSS bucket, because after the blank check the handler calls ossClient.doesBucketExist to verify existence"],"exampleFix":"// before (common.properties)\nremote.logging.oss.enable=true\n# remote.logging.oss.bucket.name not set\n\n// after\nremote.logging.oss.enable=true\nremote.logging.oss.bucket.name=dolphinscheduler-logs\nremote.logging.oss.endpoint=oss-cn-hangzhou.aliyuncs.com","handlingStrategy":"validation","validationCode":"String bucket = PropertyUtils.getString(\"remote.logging.oss.bucket.name\");\nif (bucket == null || bucket.trim().isEmpty()) {\n    throw new IllegalStateException(\"remote.logging.oss.bucket.name must be set when remote.logging.oss.enable=true\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    ossRemoteLogHandler.checkBucketNameExists(bucketName);\n} catch (IllegalArgumentException e) {\n    log.error(\"OSS remote logging config error: {}\", e.getMessage());\n}","preventionTips":["Pair every remote.logging.oss.enable=true with all OSS keys (bucket.name, endpoint, access-key-id, secret-key)","Validate config at deploy time with a properties lint script","Avoid templated placeholders that can render empty","Document required keys in deployment runbooks"],"tags":["configuration","oss","logging","illegal-argument"],"backgroundTag":"missing-required-config-field","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}