# AdminCommandFailedException: Partition reassignment failed due to no viable candidates

- **ID:** `kafka/partition-reassignment-failed-no-candidates`
- **Domain:** kafka
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 70%

## Root Cause

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

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Kafka 3.2.0 | active | — | — |
| Kafka 3.5.0 | active | — | — |
| Kafka 3.7.0 | active | — | — |

## Workarounds

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.** (75% success)
   ```
   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`.** (80% success)
   ```
   Use the `--generate` option in `kafka-reassign-partitions.sh` to create a reassignment plan that respects current constraints, then execute it with `--execute`.
   ```

## Dead Ends

- **Forcing reassignment with `--force` flag without adjusting constraints** — The `--force` flag does not bypass viability checks; it only skips some safety checks, and the algorithm still fails. (90% fail)
- **Manually specifying a broker that is already at full disk capacity** — The broker cannot accept more partitions due to resource limits, and the reassignment will fail or degrade cluster performance. (85% fail)
