{"record":{"id":"e329831b2fd13b84","repo":"apache/pulsar","slug":"couldn-t-get-the-azure-storage-account","errorCode":null,"errorMessage":"Couldn't get the azure storage account.","messagePattern":"Couldn't get the azure storage account\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java","lineNumber":163,"sourceCode":"                Credentials credentials = config.getProviderCredentials().get();\n                return contextBuilder\n                        .credentials(credentials.identity, credentials.credential)\n                        .buildView(BlobStoreContext.class)\n                        .getBlobStore();\n            } else {\n                log.warn().attr(\"driver\", config.getDriver()).attr(\"bucket\", config.getBucket())\n                    .log(\"The credentials is null\");\n                return contextBuilder\n                        .buildView(BlobStoreContext.class)\n                        .getBlobStore();\n            }\n        }\n\n        @Override\n        public void buildCredentials(TieredStorageConfiguration config) {\n            String accountName = System.getenv(\"AZURE_STORAGE_ACCOUNT\");\n            if (StringUtils.isEmpty(accountName)) {\n                throw new IllegalArgumentException(\"Couldn't get the azure storage account.\");\n            }\n            String accountKey = System.getenv(\"AZURE_STORAGE_ACCESS_KEY\");\n            if (StringUtils.isEmpty(accountKey)) {\n                throw new IllegalArgumentException(\"Couldn't get the azure storage access key.\");\n            }\n            config.setProviderCredentials(() -> new Credentials(accountName, accountKey));\n        }\n    },\n\n\n    /**\n     * Aliyun OSS is compatible with the S3 API.\n     * https://www.alibabacloud.com/help/doc-detail/64919.htm\n     */\n    ALIYUN_OSS(\"aliyun-oss\", new AnonymousProviderMetadata(new S3ApiMetadata(), \"\")) {\n        @Override\n        public void validate(TieredStorageConfiguration config) throws IllegalArgumentException {\n            S3_VALIDATION.validate(config);","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java#L145-L181","documentation":"Azure offload provider configuration error: the AZURE_STORAGE_ACCOUNT environment variable (or equivalent config) is missing, so the storage account name needed to build Azure credentials could not be obtained.","triggerScenarios":"Thrown at tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java:163 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the AZURE_STORAGE_ACCOUNT environment variable or configure the account explicitly"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}