{"record":{"id":"48c05d17382d8c85","repo":"apache/dolphinscheduler","slug":"remote-logging-cos-bucket-name-is-empty","errorCode":null,"errorMessage":"remote.logging.cos.bucket.name is empty","messagePattern":"remote\\.logging\\.cos\\.bucket\\.name is empty","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/CosRemoteLogHandler.java","lineNumber":102,"sourceCode":"\n        try {\n            log.info(\"get remote log from tencent cos {} to {}\", objectName, logPath);\n            cosClient.getObject(new GetObjectRequest(bucketName, objectName), new File(logPath));\n        } catch (Exception e) {\n            log.error(\"error while sending remote log from {} to tencent cos {}, reason:\", objectName, logPath, e);\n        }\n    }\n\n    @Override\n    public void close() throws IOException {\n        if (cosClient != null) {\n            cosClient.shutdown();\n        }\n    }\n\n    private void checkBucketNameExists(String bucketName) {\n        if (StringUtils.isBlank(bucketName)) {\n            throw new IllegalArgumentException(Constants.REMOTE_LOGGING_COS_BUCKET_NAME + \" is empty\");\n        }\n        boolean existsBucket = cosClient.doesBucketExist(bucketName);\n        if (!existsBucket) {\n            throw new IllegalArgumentException(\n                    \"bucketName: \" + bucketName + \" does not exists, you should create it first\");\n        }\n\n        log.debug(\"tencent cos bucket {} has been found for remote logging\", bucketName);\n    }\n}\n","sourceCodeStart":84,"sourceCodeEnd":113,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/CosRemoteLogHandler.java#L84-L113","documentation":"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.","triggerScenarios":"Enabling remote logging with cos as storage type but leaving remote.logging.cos.bucket.name empty in the remote-logging configuration when CosRemoteLogHandler initializes.","commonSituations":"Config template copied without filling COS bucket; wrong property key so value loads blank; bucket name removed during environment migration.","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."],"exampleFix":"// before\nremote.logging.cos.bucket.name=\n\n// after\nremote.logging.cos.bucket.name=dolphinscheduler-logs-1250000000","handlingStrategy":"validation","validationCode":"String bucket = config.getRemoteLoggingCosBucketName();\nif (StringUtils.isBlank(bucket)) {\n    throw new IllegalArgumentException(\"remote.logging.cos.bucket.name must be set when COS remote logging is enabled\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    initCosRemoteLogHandler();\n} catch (IllegalArgumentException e) {\n    log.error(\"COS remote logging misconfigured: {}\", e.getMessage());\n}","preventionTips":["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."],"tags":["tencent-cos","remote-logging","configuration"],"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"}