apache/druid · error · RuntimeException
RuntimeException wrapping underlying cause
Error message
RuntimeException wrapping underlying cause
What it means
pushTaskFile wraps any exception from azureStorage.uploadBlockBlob in a plain RuntimeException. This happens when a task log, report, status, or payload file cannot be uploaded to the configured Azure blob container. The RuntimeException is an opaque wrapper; the real failure (auth, network, container missing, throttling) is in the cause chain.
Source
Thrown at extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureTaskLogs.java:99
log.info("Pushing task reports %s to: %s", reportFile, taskKey);
pushTaskFile(reportFile, taskKey);
}
@Override
public void pushTaskStatus(String taskid, File statusFile)
{
final String taskKey = getTaskStatusKey(taskid);
log.info("Pushing task status %s to: %s", statusFile, taskKey);
pushTaskFile(statusFile, taskKey);
}
private void pushTaskFile(final File logFile, String taskKey)
{
try {
azureStorage.uploadBlockBlob(logFile, config.getContainer(), taskKey, accountConfig.getMaxTries());
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public void pushTaskPayload(String taskid, File taskPayloadFile)
{
final String taskKey = getTaskPayloadKey(taskid);
log.info("Pushing task payload [%s] to location [%s]", taskPayloadFile, taskKey);
pushTaskFile(taskPayloadFile, taskKey);
}
@Override
public Optional<InputStream> streamTaskPayload(String taskid) throws IOException
{
return streamTaskFile(0, getTaskPayloadKey(taskid));
}
@OverrideView on GitHub (pinned to 9b90983fd2)
Solutions
- Read the getCause() chain of the RuntimeException to identify the underlying Azure SDK exception (BlobStorageException status code, IOException, etc.)
- Verify druid.storage.container exists in the storage account and the account name/key/SAS token are valid (az storage container list)
- Increase azure.maxTries if Azure throttling is suspected, and check Azure Storage metrics for 4xx/5xx responses
- Check connectivity from Druid task JVMs to the Azure blob endpoint (proxy, DNS, firewall rules)
Defensive patterns
Strategy: try-catch
Validate before calling
// preflight: verify container access before pushing azureStorage.getBlockBlobExists(config.getContainer(), taskKey, accountConfig.getMaxTries());
Try / catch
try { taskLogs.pushTaskLog(taskId, logFile); } catch (RuntimeException e) { Throwable cause = e.getCause(); log.error("Azure upload failed: {}", cause == null ? e : cause); } Prevention
- Validate container name and credentials with a startup preflight call (list blobs or get properties)
- Set azure.maxTries high enough to absorb transient Azure throttling
- Monitor getCause() for BlobStorageException status codes and alert on 403/404
When it happens
Trigger: Calling pushTaskLog, pushTaskReports, pushTaskStatus, or pushTaskPayload when azureStorage.uploadBlockBlob fails after maxTries — e.g., invalid container name, wrong account key/SAS token, transient storage outage, or blob name conflicts.
Common situations: Misconfigured druid.storage.container; expired or revoked storage keys; Azure throttling (429) exceeding maxTries during heavy task completion; network partition between Druid middle managers and Azure Storage.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- IOException wrapping underlying cause
- IOException wrapping underlying cause
- Recoverable exception
- Failed to get blob item from Azure container[%s], prefix[%s
- Failed to stream logs from: %s
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/190bbe3a3cae986e.
Report an issue: GitHub.