apache/pulsar · error · IllegalArgumentException

Couldn't get the azure storage access key.

Error message

Couldn't get the azure storage access key.

What it means

Azure offload provider configuration error: the AZURE_STORAGE_ACCESS_KEY environment variable (or equivalent config) is missing, so the storage account access key could not be obtained for credentials.

Source

Thrown at tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java:167

                        .getBlobStore();
            } else {
                log.warn().attr("driver", config.getDriver()).attr("bucket", config.getBucket())
                    .log("The credentials is null");
                return contextBuilder
                        .buildView(BlobStoreContext.class)
                        .getBlobStore();
            }
        }

        @Override
        public void buildCredentials(TieredStorageConfiguration config) {
            String accountName = System.getenv("AZURE_STORAGE_ACCOUNT");
            if (StringUtils.isEmpty(accountName)) {
                throw new IllegalArgumentException("Couldn't get the azure storage account.");
            }
            String accountKey = System.getenv("AZURE_STORAGE_ACCESS_KEY");
            if (StringUtils.isEmpty(accountKey)) {
                throw new IllegalArgumentException("Couldn't get the azure storage access key.");
            }
            config.setProviderCredentials(() -> new Credentials(accountName, accountKey));
        }
    },


    /**
     * Aliyun OSS is compatible with the S3 API.
     * https://www.alibabacloud.com/help/doc-detail/64919.htm
     */
    ALIYUN_OSS("aliyun-oss", new AnonymousProviderMetadata(new S3ApiMetadata(), "")) {
        @Override
        public void validate(TieredStorageConfiguration config) throws IllegalArgumentException {
            S3_VALIDATION.validate(config);
        }

        @Override
        public BlobStore getBlobStore(TieredStorageConfiguration config) {

View on GitHub (pinned to 820761864e)

Solutions

  1. Set the AZURE_STORAGE_ACCESS_KEY environment variable or provide the key in configuration
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java:167 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/28d2d95e0f9fa1e2. Report an issue: GitHub.