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));
  }

  @Override

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Read the getCause() chain of the RuntimeException to identify the underlying Azure SDK exception (BlobStorageException status code, IOException, etc.)
  2. Verify druid.storage.container exists in the storage account and the account name/key/SAS token are valid (az storage container list)
  3. Increase azure.maxTries if Azure throttling is suspected, and check Azure Storage metrics for 4xx/5xx responses
  4. 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

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


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/190bbe3a3cae986e. Report an issue: GitHub.