apache/dolphinscheduler · critical · IllegalArgumentException

bucketName: ${bucketName} is not exists, you need to create

Error message

bucketName: ${bucketName} is not exists, you need to create them by yourself

What it means

ObsStorageOperator.ensureBucketSuccessfullyCreated throws IllegalArgumentException when headBucket reports the configured bucket does not exist in the region/credentials in use. DolphinScheduler does not auto-create OBS buckets, so initialization fails.

Source

Thrown at dolphinscheduler-storage-plugin/dolphinscheduler-storage-obs/src/main/java/org/apache/dolphinscheduler/plugin/storage/obs/ObsStorageOperator.java:251

        return storageEntityList;
    }

    @Override
    public StorageEntity getStorageEntity(String resourceAbsolutePath) {
        resourceAbsolutePath = transformObsKeyToAbsolutePath(resourceAbsolutePath);

        ObsObject object = obsClient.getObject(bucketName, resourceAbsolutePath);
        return transformObsObjectToStorageEntity(object);
    }

    private void ensureBucketSuccessfullyCreated(String bucketName) {
        if (StringUtils.isBlank(bucketName)) {
            throw new IllegalArgumentException("resource.alibaba.cloud.obs.bucket.name is empty");
        }

        boolean existsBucket = obsClient.headBucket(bucketName);
        if (!existsBucket) {
            throw new IllegalArgumentException(
                    "bucketName: " + bucketName + " is not exists, you need to create them by yourself");
        }

        log.info("bucketName: {} has been found", bucketName);
    }

    protected StorageEntity transformObsObjectToStorageEntity(ObsObject object) {
        ObjectMetadata metadata = object.getMetadata();
        String fileAbsolutePath = transformObsKeyToAbsolutePath(object.getObjectKey());
        ResourceMetadata resourceMetaData = getResourceMetaData(fileAbsolutePath);
        String fileExtension = com.google.common.io.Files.getFileExtension(resourceMetaData.getResourceAbsolutePath());

        return StorageEntity.builder()
                .fileName(new File(fileAbsolutePath).getName())
                .fullName(fileAbsolutePath)
                .pfullName(resourceMetaData.getResourceParentAbsolutePath())
                .type(resourceMetaData.getResourceType())
                .isDirectory(StringUtils.isEmpty(fileExtension))

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Create the bucket in the OBS console (or CLI) in the same region as the configured endpoint
  2. Fix the bucket name / endpoint mismatch in the config
  3. Grant the access key permission to head the bucket (ListBucket/HeadBucket)

Example fix

// before
resource.alibaba.cloud.obs.bucket.name=my-bukcet  // typo
// after
resource.alibaba.cloud.obs.bucket.name=my-bucket
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight with the AWS/OBS SDK before init:
boolean ok = new ObsClient(ak, sk, endpoint).headBucket(bucketName);
if (!ok) throw new IllegalStateException("Bucket " + bucketName + " does not exist at " + endpoint);

Try / catch

try {
    storageOperator = new ObsStorageOperator(cfg);
} catch (IllegalArgumentException e) {
    if (e.getMessage().contains("is not exists")) {
        throw new IllegalStateException("Create the bucket first: " + e.getMessage(), e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Initializing ObsStorageOperator with a bucket name that is not present under the configured endpoint/credentials — typo in name, wrong region endpoint, or bucket deleted.

Common situations: Bucket created in a different region than the configured endpoint; IAM user lacking obs:ListBucket/HeadBucket permission so headBucket returns false; bucket name typo; using a bucket from another cloud account.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/3621987b8ed903ca. Report an issue: GitHub.