# Kafka connect rebalance failed

**URL:** <https://forum.confluent.io/t/kafka-connect-rebalance-failed/2508>\
**Category:** Kafka Connect\
**Created:** [17 August 2021 09:06 UTC](https://forum.confluent.io/t/kafka-connect-rebalance-failed/2508 "2021-08-17T09:06:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhuvaneshdct](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/bhuvaneshdct/32/1009_2.png) [@bhuvaneshdct](https://forum.confluent.io/u/bhuvaneshdct)\
**Post date:** [17 August 2021 09:06 UTC](https://forum.confluent.io/t/kafka-connect-rebalance-failed/2508/1 "2021-08-17T09:06:37Z")

</div>

I have 2 Kafka connect worker nodes. I have deployed Debezium connectors.

2 different connectors I deployed. Node 1 was managing connector 1 and node2 was managing connector 2.

I tried to restart the worker service on Node2.

As per the distributed mode, the connector-2’s tasks should move to the Node1. It worked. Then after a few seconds, I did the restart again, this time the rebalancing does not happen. Instead, the tasks went to a UNASSIGNED state. Exactly after 5mins from the worker service restart, its back to ASSIGNED state on the same node.

Then tried do restart the worker service for a couple of times, but no luck, Can someone help me what happened here and why the rebalanceing is not working?

I tried to restart, but its not solving my issue.

```auto
curl -X POST 172.30.34.99:8083/connectors/mysql-connector-01/restart

{"error_code":409,"message":"Cannot complete request momentarily due to no known leader URL, likely because a rebalance was underway."}

```

---

<div class="post-metadata">

**Author:** ![bhuvaneshdct](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/bhuvaneshdct/32/1009_2.png) [@bhuvaneshdct](https://forum.confluent.io/u/bhuvaneshdct)\
**Post date:** [17 August 2021 12:25 UTC](https://forum.confluent.io/t/kafka-connect-rebalance-failed/2508/2 "2021-08-17T12:25:19Z")

</div>

Found the cause and the detailed information is here.

> **[Incremental Cooperative Rebalancing in Apache Kafka](https://www.confluent.io/blog/incremental-cooperative-rebalancing-in-kafka/)**
>
> Learn how load balancing works, the challenges of existing load balancing protocols, and how Incremental Cooperative Rebalancing allows large-scale deployment of Kafka clients.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [16 September 2021 12:25 UTC](https://forum.confluent.io/t/kafka-connect-rebalance-failed/2508/3 "2021-09-16T12:25:38Z")

</div>

Closed on 16 September 2021 12:25 UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
