{"record":{"id":"8d5e2246b1010dd7","repo":"apache/pulsar","slug":"timeout-during-skip-messages-operation","errorCode":null,"errorMessage":"Timeout during skip messages operation","messagePattern":"Timeout during skip messages operation","errorType":"exception","errorClass":"ManagedLedgerException","httpStatus":null,"severity":"error","filePath":"managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java","lineNumber":2061,"sourceCode":"\n        final Result result = new Result();\n        final CountDownLatch counter = new CountDownLatch(1);\n\n        asyncSkipEntries(numEntriesToSkip, deletedEntries, new SkipEntriesCallback() {\n            @Override\n            public void skipEntriesComplete(Object ctx) {\n                counter.countDown();\n            }\n\n            @Override\n            public void skipEntriesFailed(ManagedLedgerException exception, Object ctx) {\n                result.exception = exception;\n                counter.countDown();\n            }\n        }, null);\n\n        if (!counter.await(ManagedLedgerImpl.AsyncOperationTimeoutSeconds, TimeUnit.SECONDS)) {\n            throw new ManagedLedgerException(\"Timeout during skip messages operation\");\n        }\n\n        if (result.exception != null) {\n            throw result.exception;\n        }\n    }\n\n    @Override\n    public void asyncSkipEntries(int numEntriesToSkip, IndividualDeletedEntries deletedEntries,\n            final SkipEntriesCallback callback, Object ctx) {\n        log.info().attr(\"numEntriesToSkip\", numEntriesToSkip).log(\"Skipping entries\");\n        long numDeletedMessages = 0;\n        if (deletedEntries == IndividualDeletedEntries.Exclude) {\n            numDeletedMessages = getNumIndividualDeletedEntriesToSkip(numEntriesToSkip);\n        }\n\n        asyncMarkDelete(ledger.getPositionAfterN(markDeletePosition, numEntriesToSkip + numDeletedMessages,\n                PositionBound.startExcluded), new MarkDeleteCallback() {","sourceCodeStart":2043,"sourceCodeEnd":2079,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java#L2043-L2079","documentation":"Azure Blob offload builds Credentials(accountName, accountKey) from AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY. This IllegalArgumentException is thrown when AZURE_STORAGE_ACCESS_KEY is empty or unset while the storage account name was present. Without the access key no shared-key authentication can be performed.","triggerScenarios":"Calling buildCredentials for driver=azureblob when AZURE_STORAGE_ACCESS_KEY is missing/empty (account name check at the preceding line already passed).","commonSituations":"Only AZURE_STORAGE_ACCOUNT was exported; the secret containing the key was not injected in K8s; key was rotated and the env var left blank; quoting issues in docker/systemd dropping the variable.","solutions":["Set AZURE_STORAGE_ACCESS_KEY to the storage account's key (Azure Portal -> Storage account -> Access keys).","Ensure both AZURE variables are injected together in the same deployment unit (Docker env, K8s envFrom/secret, systemd EnvironmentFile).","Verify the value is non-empty after shell/K8s expansion (quotes, $ escaping, secretRef names).","Consider migrating to Azure managed identity / token credential providers to avoid key handling."],"exampleFix":"// before: account set, key missing\nexport AZURE_STORAGE_ACCOUNT=mystorageacct\n\n// after: both required variables exported\nexport AZURE_STORAGE_ACCOUNT=mystorageacct\nexport AZURE_STORAGE_ACCESS_KEY=$(az storage account keys list -n mystorageacct --query '[0].value' -o tsv)","handlingStrategy":"validation","validationCode":"String key = System.getenv(\"AZURE_STORAGE_ACCESS_KEY\");\nif (key == null || key.isEmpty()) {\n    throw new IllegalStateException(\"AZURE_STORAGE_ACCESS_KEY must be set for azureblob offload\");\n}\n// optional sanity: Base64 decodable\njava.util.Base64.getDecoder().decode(key);","typeGuard":null,"tryCatchPattern":"try {\n    provider.buildCredentials(tieringConfig);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"access key\")) {\n        log.error(\"Set AZURE_STORAGE_ACCESS_KEY for the storage account named in AZURE_STORAGE_ACCOUNT\");\n    }\n    throw e;\n}","preventionTips":["Rotate keys via Azure CLI and update the secret atomically; never leave the env var blank.","Verify secretRef/envFrom names in K8s match the secret actually containing the key.","Test with a quick `az storage account keys list` before deploying.","Set both AZURE env vars together in one config source so they can't drift."],"tags":["azure","configuration","env-var","credentials"],"backgroundTag":"missing-env-var","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"}