apache/beam · error · FileNotFoundException

This container does not exist. Creating containers is not…

Error message

This container does not exist. Creating containers is not supported.

What it means

AzureBlobStoreFileSystem.create refuses to write when the target blob's container does not exist, throwing FileNotFoundException('This container does not exist. Creating containers is not supported.'). The connector never auto-creates containers, so the destination must pre-exist.

Solutions

  1. Create the container beforehand, e.g. `az storage container create --name mycontainer --account-name ...`.
  2. Verify the container name in the output path matches an existing container (case-sensitive).
  3. Add a pre-provisioning step to pipeline deployment (Terraform/CLI) for all output containers.
  4. Check credentials can see the container — missing permissions can surface as 'does not exist'.

Example fix

// before
.apply("Write", TextIO.write().to("azure://account.newcontainer/output"));
// after
// run first: az storage container create --name newcontainer
.apply("Write", TextIO.write().to("azure://account.newcontainer/output"));
Defensive patterns

Strategy: validation

Validate before calling

// ensure the container exists before writing
az storage container exists --name $CONTAINER --account-name $ACCOUNT

Try / catch

try {
  filesink.write();
} catch (FileNotFoundException e) {
  if (e.getMessage().contains("container does not exist")) {
    log.error("Create the container first: az storage container create --name " + container);
  }
}

Prevention

When it happens

Trigger: Writing to an azure:// account.container/blob path whose container has not been created; create() checks blobContainerClient.exists() and fails.

Common situations: Typo in the container name, pointing output at a new environment (staging/prod) where the container was never provisioned, assuming the connector creates containers like a local filesystem creates directories.

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/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/eeecdaf3456e6b81. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/azure/src/main/java/org/apache/beam/sdk/io/azure/blobstore/AzureBlobStoreFileSystem.java:274

    }

    return MatchResult.create(
        MatchResult.Status.OK,
        ImmutableList.of(
            toMetadata(
                path.withSize(blobProperties.getBlobSize())
                    .withLastModified(Date.from(blobProperties.getLastModified().toInstant())),
                blobProperties.getContentEncoding(),
                blobProperties.getETag())));
  }

  @Override
  protected WritableByteChannel create(AzfsResourceId resourceId, CreateOptions createOptions)
      throws IOException {
    BlobContainerClient blobContainerClient =
        client.get().getBlobContainerClient(resourceId.getContainer());
    if (!blobContainerClient.exists()) {
      throw new FileNotFoundException(
          "This container does not exist. Creating containers is not supported.");
    }

    BlobClient blobClient = blobContainerClient.getBlobClient(resourceId.getBlob());
    // The getBlobOutputStream method overwrites existing blobs,
    // so throw an error in this case to prevent data loss
    if (blobClient.exists()) {
      throw new IOException("This filename is already in use.");
    }

    OutputStream outputStream;
    try {
      outputStream = blobClient.getBlockBlobClient().getBlobOutputStream();
    } catch (BlobStorageException e) {
      throw (IOException) e.getCause();
    }
    return newChannel(outputStream);
  }

View on GitHub (pinned to 12126d8942)