{"record":{"id":"b0d900419b662b85","repo":"apache/dolphinscheduler","slug":"remote-logging-google-cloud-storage-bucket-name-is","errorCode":null,"errorMessage":"remote.logging.google.cloud.storage.bucket.name is blank","messagePattern":"remote\\.logging\\.google\\.cloud\\.storage\\.bucket\\.name is blank","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/GcsRemoteLogHandler.java","lineNumber":130,"sourceCode":"    protected Storage buildGcsStorage(String credential) throws IOException {\n        return StorageOptions.newBuilder()\n                .setCredentials(ServiceAccountCredentials.fromStream(\n                        Files.newInputStream(Paths.get(credential))))\n                .build()\n                .getService();\n    }\n\n    protected String readCredentials() {\n        return PropertyUtils.getString(Constants.REMOTE_LOGGING_GCS_CREDENTIAL);\n    }\n\n    protected String readBucketName() {\n        return PropertyUtils.getString(Constants.REMOTE_LOGGING_GCS_BUCKET_NAME);\n    }\n\n    public void checkBucketNameExists(String bucketName) {\n        if (StringUtils.isBlank(bucketName)) {\n            throw new IllegalArgumentException(Constants.REMOTE_LOGGING_GCS_BUCKET_NAME + \" is blank\");\n        }\n\n        boolean exist = false;\n        for (Bucket bucket : gcsStorage.list().iterateAll()) {\n            if (bucketName.equals(bucket.getName())) {\n                exist = true;\n                break;\n            }\n        }\n\n        if (!exist) {\n            log.error(\n                    \"bucketName: {} does not exist, you need to create them by yourself\", bucketName);\n        } else {\n            log.info(\"bucketName: {} has been found\", bucketName);\n        }\n    }\n}","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/GcsRemoteLogHandler.java#L112-L148","documentation":"GcsRemoteLogHandler.checkBucketNameExists validates that remote logging to Google Cloud Storage is properly configured. It throws IllegalArgumentException when the configured bucket name (remote.logging.google.cloud.storage.bucket.name) is blank, before attempting to list buckets. This fail-fast check prevents the handler from silently failing to upload task logs to GCS.","triggerScenarios":"Calling checkBucketNameExists(String bucketName) with a null, empty, or whitespace-only bucketName; this happens at handler initialization when PropertyUtils.getString(Constants.REMOTE_LOGGING_GCS_BUCKET_NAME) returns blank because remote.logging.google.cloud.storage.bucket.name is unset or empty in common.properties.","commonSituations":"Enabling remote.logging.gcs.enable=true in common.properties but forgetting to set remote.logging.google.cloud.storage.bucket.name; leaving the property as an empty placeholder value; deploying with a stale/partial config that omits GCS keys.","solutions":["Set remote.logging.google.cloud.storage.bucket.name=<your-bucket> in dolphinscheduler-common/src/main/resources/common.properties (or the deployed conf dir) and restart","Verify the property is actually loaded: check the deployed common.properties, not just the repo copy, and confirm no leading/trailing quotes or whitespace-only value","If remote logging is not needed, disable remote.logging.gcs.enable so the GCS handler is never initialized","Confirm the bucket exists in GCS beforehand, since after the blank check the handler lists buckets to verify the name matches one you control"],"exampleFix":"// before (common.properties)\nremote.logging.gcs.enable=true\nremote.logging.google.cloud.storage.bucket.name=\n\n// after\nremote.logging.gcs.enable=true\nremote.logging.google.cloud.storage.bucket.name=my-dolphinscheduler-logs","handlingStrategy":"validation","validationCode":"String bucket = PropertyUtils.getString(\"remote.logging.google.cloud.storage.bucket.name\");\nif (bucket == null || bucket.trim().isEmpty()) {\n    throw new IllegalStateException(\"Set remote.logging.google.cloud.storage.bucket.name in common.properties before enabling GCS remote logging\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    gcsRemoteLogHandler.checkBucketNameExists(bucketName);\n} catch (IllegalArgumentException e) {\n    log.error(\"GCS remote logging misconfigured: {}\", e.getMessage());\n}","preventionTips":["Keep a common.properties checklist: enabling remote.logging.gcs.enable requires bucket name to be set","Add a startup config validation that fails fast with a clear message","Grep deployed config for the key before rollout","Pre-create and verify the GCS bucket with gsutil ls"],"tags":["configuration","gcs","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"}