[
https://issues.apache.org/jira/browse/KAFKA-20228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Wu updated KAFKA-20228:
-----------------------------
Description:
If the user runs `kafka-metadata-quorum add-controller --command-config` to add
node X as a KRaft voter, and that configuration's does not specify
`advertised.listener`, and the node's `listeners` has no hostname, the
`AddVoterRPC` endpoint will be `localhost`. This means the leader sends
`API_VERSIONS` to itself and believes the node being added is another ID (X)
who's endpoint is the leader itself. Then, it will spam the logs with:
{{Voter key for VOTE or BEGIN_QUORUM_EPOCH request didn't match the receiver's
replica key}}
because the leader tries to send requests intended for node X that arrive at
itself instead.
was:
If the user runs `kafka-metadata-quorum add-controller --command-config` to add
node X as a KRaft voter, and that configuration's does not specify
`advertised.listener`, the leader log can get spammed with:
{{Voter key for VOTE or BEGIN_QUORUM_EPOCH request didn't match the receiver's
replica key}}
because the leader tries to send requests intended for node X that arrive at
itself instead.
> Do not allow add-controller to send localhost as endpoint
> ---------------------------------------------------------
>
> Key: KAFKA-20228
> URL: https://issues.apache.org/jira/browse/KAFKA-20228
> Project: Kafka
> Issue Type: Bug
> Components: kraft
> Reporter: Kevin Wu
> Assignee: Kevin Wu
> Priority: Major
>
> If the user runs `kafka-metadata-quorum add-controller --command-config` to
> add node X as a KRaft voter, and that configuration's does not specify
> `advertised.listener`, and the node's `listeners` has no hostname, the
> `AddVoterRPC` endpoint will be `localhost`. This means the leader sends
> `API_VERSIONS` to itself and believes the node being added is another ID (X)
> who's endpoint is the leader itself. Then, it will spam the logs with:
> {{Voter key for VOTE or BEGIN_QUORUM_EPOCH request didn't match the
> receiver's replica key}}
> because the leader tries to send requests intended for node X that arrive at
> itself instead.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)