{"record":{"id":"7dbfd42ec56de94b","repo":"apache/dolphinscheduler","slug":"remote-logging-s3-bucket-name-is-blank","errorCode":null,"errorMessage":"remote.logging.s3.bucket.name is blank","messagePattern":"remote\\.logging\\.s3\\.bucket\\.name is blank","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/S3RemoteLogHandler.java","lineNumber":110,"sourceCode":"                    FileOutputStream fos = new FileOutputStream(logPath)) {\n                byte[] readBuf = new byte[1024];\n                int readLen = 0;\n                while ((readLen = s3is.read(readBuf)) > 0) {\n                    fos.write(readBuf, 0, readLen);\n                }\n            }\n        } catch (Exception e) {\n            log.error(\"error while getting remote log on S3 {} to {}\", objectName, logPath, e);\n        }\n    }\n\n    protected String readBucketName() {\n        return PropertyUtils.getString(Constants.AWS_S3_BUCKET_NAME);\n    }\n\n    public void checkBucketNameExists(String bucketName) {\n        if (StringUtils.isBlank(bucketName)) {\n            throw new IllegalArgumentException(\"remote.logging.s3.bucket.name is blank\");\n        }\n\n        boolean existsBucket = s3Client.doesBucketExistV2(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, the current regionName is {}\", bucketName,\n                s3Client.getRegionName());\n    }\n}\n","sourceCodeStart":92,"sourceCodeEnd":123,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/S3RemoteLogHandler.java#L92-L123","documentation":"S3RemoteLogHandler.checkBucketNameExists validates S3 remote-log configuration. It throws IllegalArgumentException with the literal message \"remote.logging.s3.bucket.name is blank\" when the bucket name passed in is null/empty/whitespace. This fail-fast check runs before s3Client.doesBucketExistV2 is called.","triggerScenarios":"checkBucketNameExists is called during handler initialization with a blank bucketName because PropertyUtils.getString(Constants.AWS_S3_BUCKET_NAME) returned null/empty, i.e. remote.logging.s3.bucket.name is unset in common.properties while S3 remote logging is enabled.","commonSituations":"Setting remote.logging.s3.enable=true without the bucket name; AWS configuration migrated to another key (note readBucketName uses AWS_S3_BUCKET_NAME, not a GCS-style key, so a wrong key name yields null); environment-specific config files that omit S3 keys.","solutions":["Set remote.logging.s3.bucket.name=<your-bucket> in common.properties and restart","Confirm you are using the correct property key remote.logging.s3.bucket.name (not aws.s3.bucket.name or similar) since PropertyUtils returns null for unknown keys","Disable remote.logging.s3.enable if S3 remote logging is not needed","Ensure the value has no surrounding quotes-only or whitespace content that parses as blank"],"exampleFix":"// before (common.properties)\nremote.logging.s3.enable=true\n\n// after\nremote.logging.s3.enable=true\nremote.logging.s3.bucket.name=dolphinscheduler-logs\nremote.logging.s3.region=us-east-1","handlingStrategy":"validation","validationCode":"String bucket = PropertyUtils.getString(\"remote.logging.s3.bucket.name\");\nif (bucket == null || bucket.trim().isEmpty()) {\n    throw new IllegalStateException(\"Set remote.logging.s3.bucket.name in common.properties before enabling S3 remote logging\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    s3RemoteLogHandler.checkBucketNameExists(bucketName);\n} catch (IllegalArgumentException e) {\n    log.error(\"S3 remote logging misconfigured: {}\", e.getMessage());\n}","preventionTips":["Use the exact key remote.logging.s3.bucket.name — other S3 key names will silently read as null","Add deployment-time config assertions for all remote.logging.* keys","Disable the S3 handler explicitly when not using remote logging","Confirm the property file actually shipped to the runtime conf directory"],"tags":["configuration","s3","aws","logging"],"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-14T00:17:10.932Z"}