You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2025/12/29 16:19:00 UTC

[jira] [Commented] (KAFKA-20023) Fix kafka-reassign-partitions.sh to handle dead brokers

    [ https://issues.apache.org/jira/browse/KAFKA-20023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048250#comment-18048250 ] 

Chia-Ping Tsai commented on KAFKA-20023:
----------------------------------------

[~andyg2] thanks for raising this bug. We will handle it asap

> Fix kafka-reassign-partitions.sh to handle dead brokers 
> --------------------------------------------------------
>
>                 Key: KAFKA-20023
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20023
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Andrew Grant
>            Priority: Major
>
> In https://issues.apache.org/jira/browse/KAFKA-19582 we added code to print the log directories of the replicas in the current assignment. But if the current assignment contains a dead broker, then the command will fail including when running with --execute. The error you will see is
> {code:java}
> Error: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeReplicaLogDirs
> java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeReplicaLogDirs
> 	at java.base/java.util.concurrent.CompletableFuture.wrapInExecutionException(CompletableFuture.java:347)
> 	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:442)
> 	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2119)
> 	at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:155)
> 	at org.apache.kafka.tools.reassign.ReassignPartitionsCommand.getReplicaToLogDir(ReassignPartitionsCommand.java:1689)
> 	at org.apache.kafka.tools.reassign.ReassignPartitionsCommand.currentPartitionReplicaAssignmentToString(ReassignPartitionsCommand.java:1076)
> 	at org.apache.kafka.tools.reassign.ReassignPartitionsCommand.executeAssignment(ReassignPartitionsCommand.java:920)
> 	at org.apache.kafka.tools.reassign.ReassignPartitionsCommand.handleAction(ReassignPartitionsCommand.java:197)
> 	at org.apache.kafka.tools.reassign.ReassignPartitionsCommand.main(ReassignPartitionsCommand.java:166)
> Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeReplicaLogDirs {code}
> This is problematic since kafka-reassign-partitions.sh often is used precisely for moving partitions away from dead brokers.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)