[
https://issues.apache.org/jira/browse/KAFKA-16995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856591#comment-17856591
]
Sergey commented on KAFKA-16995:
--------------------------------
I see the error message, but the documentation says otherwise:
{code:java}
Listener names and port numbers must be unique unless
one listener is an IPv4 address and the other listener is
an IPv6 address (for the same port){code}
as well as examples from KIP
[https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=195726330]
I used the following config according to the documentation:
listeners=CONTROLPLANE://0.0.0.0:9090,SSL://0.0.0.0:9093,SSL://[::]:9093
should be legitimate because the SSL listeners have the same name and port, but
one uses - IPv4 and the other uses - IPv6.
> The listeners broker parameter incorrect documentation
> -------------------------------------------------------
>
> Key: KAFKA-16995
> URL: https://issues.apache.org/jira/browse/KAFKA-16995
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 3.6.1
> Environment: Kafka 3.6.1
> Reporter: Sergey
> Assignee: dujian0068
> Priority: Minor
>
> We are using Kafka 3.6.1 and the
> [KIP-797|https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=195726330]
> describes configuring listeners with the same port and name for supporting
> IPv4/IPv6 dual-stack.
> Documentation link:
> [https://kafka.apache.org/36/documentation.html#brokerconfigs_listeners]
> As I understand it, Kafka should allow us to set the listener name and
> listener port to the same value if we configure dual-stack.
> But in reality, the broker returns an error if we set the listener name to
> the same value.
> Error example:
> {code:java}
> java.lang.IllegalArgumentException: requirement failed: Each listener must
> have a different name, listeners:
> CONTROLPLANE://0.0.0.0:9090,SSL://0.0.0.0:9093,SSL://[::]:9093
> at scala.Predef$.require(Predef.scala:337)
> at kafka.utils.CoreUtils$.validate$1(CoreUtils.scala:214)
> at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:268)
> at kafka.server.KafkaConfig.listeners(KafkaConfig.scala:2120)
> at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1807)
> at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1604)
> at kafka.Kafka$.buildServer(Kafka.scala:72)
> at kafka.Kafka$.main(Kafka.scala:91)
> at kafka.Kafka.main(Kafka.scala) {code}
> I've tried to set the listeners to: "SSL://0.0.0.0:9093,SSL://[::]:9093"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)