provectus/kafka-ui · error · NotFoundException

Connect not found for cluster

Error message

Connect %s not found for cluster %s

What it means

The private api(cluster, connectName) helper resolves the Kafka Connect client registered on the cluster configuration. If no Connect instance is registered under the given connectName, it throws NotFoundException identifying both the Connect name and cluster name. All Connect-related operations (listing connectors, getting/setting connector config, getting connector topics, creating connectors) route through this check, so any request against an unregistered Connect cluster fails here.

Solutions

  1. Verify the connectName in the request URL matches a configured Kafka Connect instance (GET /api/clusters/{cluster}/connects lists valid names).
  2. Add the Connect cluster to kafka-ui config (kafka.clusters[].kafka.connect section in application.yml / env vars) and restart or apply dynamic config.
  3. Confirm the clusterName path segment is correct; a wrong cluster will not contain the Connect client.
  4. Update stale UI bookmarks/scripts to the current Connect name.

Example fix

# before (application.yml)
kafka:
  clusters:
    - name: local
# after
kafka:
  clusters:
    - name: local
      kafka:
        connect:
          - name: connect-1
            address: http://connect:8083
Defensive patterns

Strategy: validation

Validate before calling

const connects = await fetch(`/api/clusters/${cluster}/connects`).then(r => r.json());
if (!connects.some(c => c.name === connectName)) {
  throw new Error(`Connect ${connectName} is not registered on cluster ${cluster}`);
}

Try / catch

try {
  return await api.get(`/api/clusters/${cluster}/connects/${connect}/connectors`);
} catch (e) {
  if (e.response?.status === 404 || e.message.includes('not found for cluster')) {
    // surface config guidance: register the Connect instance first
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling any connector endpoint (GET/POST /api/clusters/{cluster}/connects/{connectName}/...) where connectName does not match a Connect cluster configured for that Kafka cluster; using a Connect name after it was removed from application.yml or replaced via dynamic config; passing the wrong clusterName in the URL so the Connect lookup happens against the wrong cluster.

Common situations: Typo or casing mismatch in the connect name in the UI/API URL; Kafka Connect instance unregistered or removed from configuration while saved UI bookmarks still reference it; deploying kafka-ui without the 'kafka.connect' section of application.yml; renaming a Connect cluster in config but stale clients/links pointing to the old name.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of provectus/kafka-ui@83b5a60cc0 (2026-09-08). Data as JSON: /api/errors/67169697031aad72. Report an issue: GitHub.

Appendix: source

Thrown at kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/KafkaConnectService.java:290

    return api(cluster, connectName)
        .flux(client -> client.getConnectorPlugins().map(kafkaConnectMapper::fromClient));
  }

  public Mono<ConnectorPluginConfigValidationResponseDTO> validateConnectorPluginConfig(
      KafkaCluster cluster, String connectName, String pluginName, Mono<Map<String, Object>> requestBody) {
    return api(cluster, connectName)
        .mono(client ->
            requestBody
                .flatMap(body ->
                    client.validateConnectorPluginConfig(pluginName, body))
                .map(kafkaConnectMapper::fromClient)
        );
  }

  private ReactiveFailover<KafkaConnectClientApi> api(KafkaCluster cluster, String connectName) {
    var client = cluster.getConnectsClients().get(connectName);
    if (client == null) {
      throw new NotFoundException(
          "Connect %s not found for cluster %s".formatted(connectName, cluster.getName()));
    }
    return client;
  }
}

View on GitHub (pinned to 83b5a60cc0)