{"record":{"id":"d6d09259bebd1ac0","repo":"apache/dolphinscheduler","slug":"bucketname-bucketname-is-not-exists-you-need-d6d092","errorCode":null,"errorMessage":"bucketName: ${bucketName} is not exists, you need to create them by yourself","messagePattern":"bucketName: (.+?) is not exists, you need to create them by yourself","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"dolphinscheduler-storage-plugin/dolphinscheduler-storage-oss/src/main/java/org/apache/dolphinscheduler/plugin/storage/oss/OssStorageOperator.java","lineNumber":296,"sourceCode":"\n        return storageEntityList;\n    }\n\n    @Override\n    public StorageEntity getStorageEntity(String resourceAbsolutePath) {\n        resourceAbsolutePath = transformAbsolutePathToOssKey(resourceAbsolutePath);\n        OSSObject object = ossClient.getObject(new GetObjectRequest(bucketName, resourceAbsolutePath));\n        return transformOSSObjectToStorageEntity(object);\n    }\n\n    private void ensureBucketSuccessfullyCreated(String bucketName) {\n        if (StringUtils.isBlank(bucketName)) {\n            throw new IllegalArgumentException(\"resource.alibaba.cloud.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, the current regionName is {}\", bucketName, region);\n    }\n    protected StorageEntity transformOSSObjectToStorageEntity(OSSObject ossObject) {\n        ResourceMetadata resourceMetaData = getResourceMetaData(ossObject.getKey());\n\n        StorageEntity storageEntity = new StorageEntity();\n        storageEntity.setFileName(new File(ossObject.getKey()).getName());\n        storageEntity.setFullName(ossObject.getKey());\n        storageEntity.setPfullName(resourceMetaData.getResourceParentAbsolutePath());\n        storageEntity.setType(resourceMetaData.getResourceType());\n        storageEntity.setDirectory(resourceMetaData.isDirectory());\n        storageEntity.setSize(ossObject.getObjectMetadata().getContentLength());\n        storageEntity.setRelativePath(resourceMetaData.getResourceRelativePath());\n        storageEntity.setCreateTime(ossObject.getObjectMetadata().getLastModified());\n        storageEntity.setUpdateTime(ossObject.getObjectMetadata().getLastModified());","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-storage-plugin/dolphinscheduler-storage-oss/src/main/java/org/apache/dolphinscheduler/plugin/storage/oss/OssStorageOperator.java#L278-L314","documentation":"OssStorageOperator.ensureBucketSuccessfullyCreated throws IllegalArgumentException when doesBucketExist returns false for the configured bucket. OSS buckets must be pre-created; DolphinScheduler only verifies existence at init.","triggerScenarios":"Initializing OssStorageOperator with a bucket name that does not exist under the configured endpoint/credentials.","commonSituations":"Bucket created in a different region (endpoint mismatch); typo in bucket name; access key lacking OSS GetBucketInfo permission making existence checks fail; bucket removed after config was written.","solutions":["Create the bucket in the OSS console in the region matching the configured endpoint","Correct the bucket name or endpoint in the config","Grant the RAM user oss:GetBucketInfo (list/read) permissions"],"exampleFix":"// before\nresource.alibaba.cloud.oss.endpoint=oss-cn-beijing.aliyuncs.com\nresource.alibaba.cloud.oss.bucket.name=bucket-in-shanghai\n// after\nresource.alibaba.cloud.oss.endpoint=oss-cn-shanghai.aliyuncs.com\nresource.alibaba.cloud.oss.bucket.name=bucket-in-shanghai","handlingStrategy":"validation","validationCode":"boolean ok = new OSSClientBuilder().build(endpoint, ak, sk)\n        .doesBucketExist(bucketName);\nif (!ok) throw new IllegalStateException(\"OSS bucket \" + bucketName + \" not found at \" + endpoint);","typeGuard":null,"tryCatchPattern":"try {\n    storageOperator = new OssStorageOperator(cfg);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"is not exists\")) {\n        throw new IllegalStateException(\"Pre-create the OSS bucket or fix endpoint/permissions\", e);\n    }\n    throw e;\n}","preventionTips":["Create the bucket in the correct region before deployment","Match the endpoint to the bucket's region","Grant the RAM role oss:GetBucketInfo so existence checks succeed"],"tags":["storage","oss","bucket-not-found","config"],"backgroundTag":"resource-not-found","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"}