kafka system_error ai_generated partial

AdminCommandFailedException: 分区重新分配失败,因为没有可行的候选节点

AdminCommandFailedException: Partition reassignment failed due to no viable candidates

ID: kafka/partition-reassignment-failed-no-candidates

其他格式: JSON · Markdown 中文 · English
70%修复率
83%置信度
1证据数
2024-01-15首次发现

版本兼容性

版本状态引入弃用备注
Kafka 3.2.0 active
Kafka 3.5.0 active
Kafka 3.7.0 active

根因分析

分区重新分配算法无法找到任何满足指定约束条件(如机架感知、资源限制)的代理。

English

The partition reassignment algorithm cannot find any broker that satisfies the specified constraints (e.g., rack awareness, resource limits).

generic

官方文档

https://kafka.apache.org/documentation/#basic_ops_cluster_expansion

解决方案

  1. Add more brokers to the cluster or free up resources on existing brokers (e.g., delete unused topics, increase disk space). Then retry the reassignment with a balanced plan.
  2. Use the `--generate` option in `kafka-reassign-partitions.sh` to create a reassignment plan that respects current constraints, then execute it with `--execute`.

无效尝试

常见但无效的做法:

  1. Forcing reassignment with `--force` flag without adjusting constraints 90% 失败

    The `--force` flag does not bypass viability checks; it only skips some safety checks, and the algorithm still fails.

  2. Manually specifying a broker that is already at full disk capacity 85% 失败

    The broker cannot accept more partitions due to resource limits, and the reassignment will fail or degrade cluster performance.