apache/druid · error · IllegalArgumentException

At least one task runner must be enabled

Error message

At least one task runner must be enabled

What it means

MultipleKubernetesTaskRunnerFactory.build() throws this IllegalArgumentException when the runner configuration defines no enabled Kubernetes clusters - every configured cluster has disabled=true, or the clusters list is empty. The multi-cluster runner needs at least one active cluster to dispatch tasks to.

Source

Thrown at extensions-core/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/MultipleKubernetesTaskRunnerFactory.java:121

    this.dynamicConfigSupplier = dynamicConfigSupplier;
    this.configManager = configManager;
    this.taskConfig = taskConfig;
    this.startupLoggingConfig = startupLoggingConfig;
    this.druidNode = druidNode;
    this.properties = properties;
    this.httpClientFactory = httpClientFactory;
  }

  @Override
  public TaskRunner build()
  {
    final List<MultipleKubernetesTaskRunnerConfig.KubernetesCluster> enabledClusters = this.runnerConfig.getClusters()
                                                                                                        .stream()
                                                                                                        .filter(cluster -> !cluster.isDisabled())
                                                                                                        .collect(Collectors.toList());

    if (enabledClusters.isEmpty()) {
      throw new IllegalArgumentException("At least one task runner must be enabled");
    }

    final String adapter = getAdapterType();
    final boolean requiresOverlordPodSource = requiresOverlordPodSource(adapter);
    final String overlordPodSourceNamespace = requiresOverlordPodSource
                                              ? getOverlordPodSourceNamespace(enabledClusters)
                                              : null;
    DruidKubernetesClient overlordPodSourceClient = null;
    AutoscalableThreadPoolExecutor sharedExecutor = null;
    final List<MultipleKubernetesTaskRunnerDelegate> taskRunners = new ArrayList<>();

    try {
      overlordPodSourceClient = requiresOverlordPodSource
                                ? createOverlordPodSourceClient(overlordPodSourceNamespace)
                                : null;
      final int totalCapacity = new KubernetesTaskRunnerEffectiveConfig(this.runnerConfig, this.dynamicConfigSupplier)
          .getCapacity();
      sharedExecutor = new AutoscalableThreadPoolExecutor(totalCapacity, this.configManager);

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Enable at least one cluster (set disabled: false) in druid.indexer.runner.k8s.clusters
  2. Add a valid cluster entry with k8sHost/credentials if the list is empty
  3. Verify the config property path so clusters actually parse into the runnerConfig
  4. If intentionally disabling all clusters, disable the multi-runner itself rather than its clusters

Example fix

// before
druid.indexer.runner.k8s.clusters=[{"name":"c1","disabled":true}]
// after
druid.indexer.runner.k8s.clusters=[{"name":"c1","disabled":false}]
Defensive patterns

Strategy: validation

Validate before calling

List<Cluster> clusters = runnerConfig.getClusters();
boolean anyEnabled = clusters != null && clusters.stream().anyMatch(c -> !c.isDisabled());
if (!anyEnabled) { throw new IllegalArgumentException("enable at least one k8s cluster"); }

Prevention

When it happens

Trigger: All entries in the multi-cluster config set disabled: true; an empty clusters list supplied to the factory; a config-filtering step (e.g. selecting clusters by label) that excludes everything.

Common situations: Operators disabling a cluster for maintenance and forgetting at least one remains; migrating from single-cluster config where the new clusters block was left empty; typo'd property names so the clusters list parses as empty.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


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