{"record":{"id":"67169697031aad72","repo":"provectus/kafka-ui","slug":"connect-s-not-found-for-cluster-s","errorCode":null,"errorMessage":"Connect %s not found for cluster %s","messagePattern":"Connect (.+?) not found for cluster (.+?)","errorType":"http","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/KafkaConnectService.java","lineNumber":290,"sourceCode":"    return api(cluster, connectName)\n        .flux(client -> client.getConnectorPlugins().map(kafkaConnectMapper::fromClient));\n  }\n\n  public Mono<ConnectorPluginConfigValidationResponseDTO> validateConnectorPluginConfig(\n      KafkaCluster cluster, String connectName, String pluginName, Mono<Map<String, Object>> requestBody) {\n    return api(cluster, connectName)\n        .mono(client ->\n            requestBody\n                .flatMap(body ->\n                    client.validateConnectorPluginConfig(pluginName, body))\n                .map(kafkaConnectMapper::fromClient)\n        );\n  }\n\n  private ReactiveFailover<KafkaConnectClientApi> api(KafkaCluster cluster, String connectName) {\n    var client = cluster.getConnectsClients().get(connectName);\n    if (client == null) {\n      throw new NotFoundException(\n          \"Connect %s not found for cluster %s\".formatted(connectName, cluster.getName()));\n    }\n    return client;\n  }\n}\n","sourceCodeStart":272,"sourceCodeEnd":296,"githubUrl":"https://github.com/provectus/kafka-ui/blob/83b5a60cc08501b570a0c4d0b4cdfceb1b88d6b7/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/KafkaConnectService.java#L272-L296","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the connectName in the request URL matches a configured Kafka Connect instance (GET /api/clusters/{cluster}/connects lists valid names).","Add the Connect cluster to kafka-ui config (kafka.clusters[].kafka.connect section in application.yml / env vars) and restart or apply dynamic config.","Confirm the clusterName path segment is correct; a wrong cluster will not contain the Connect client.","Update stale UI bookmarks/scripts to the current Connect name."],"exampleFix":"# before (application.yml)\nkafka:\n  clusters:\n    - name: local\n# after\nkafka:\n  clusters:\n    - name: local\n      kafka:\n        connect:\n          - name: connect-1\n            address: http://connect:8083","handlingStrategy":"validation","validationCode":"const connects = await fetch(`/api/clusters/${cluster}/connects`).then(r => r.json());\nif (!connects.some(c => c.name === connectName)) {\n  throw new Error(`Connect ${connectName} is not registered on cluster ${cluster}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await api.get(`/api/clusters/${cluster}/connects/${connect}/connectors`);\n} catch (e) {\n  if (e.response?.status === 404 || e.message.includes('not found for cluster')) {\n    // surface config guidance: register the Connect instance first\n  } else { throw e; }\n}","preventionTips":["List configured Connect clusters via the API before addressing one by name.","Keep connect names in application.yml / env config in sync with scripts and bookmarks.","Validate deployment config includes the kafka.connect section for every environment."],"tags":["kafka-connect","not-found","configuration","rest-api"],"backgroundTag":"entity-not-found","analyzedSha":"83b5a60cc08501b570a0c4d0b4cdfceb1b88d6b7","analyzedAt":"2026-09-08T04:35:39.002Z","contentChangedAt":"2026-09-08T04:35:39.002Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}