You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ismael Juma (Jira)" <ji...@apache.org> on 2021/06/28 14:47:00 UTC

[jira] [Updated] (KAFKA-13003) KafkaBroker advertises socket port instead of the configured advertised port

     [ https://issues.apache.org/jira/browse/KAFKA-13003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ismael Juma updated KAFKA-13003:
--------------------------------
    Labels: kip-500  (was: )

> KafkaBroker advertises socket port instead of the configured advertised port
> ----------------------------------------------------------------------------
>
>                 Key: KAFKA-13003
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13003
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.8.0
>            Reporter: Uwe Eisele
>            Assignee: Uwe Eisele
>            Priority: Critical
>              Labels: kip-500
>             Fix For: 3.0.0
>
>
> In Kraft mode Apache Kafka 2.8.0 does advertise the socket port instead of the configured advertised port.
> A broker given with the following configuration
> {code:java}
> listeners=PUBLIC://0.0.0.0:19092,REPLICATION://0.0.0.0:9091
> advertised.listeners=PUBLIC://envoy-kafka-broker:9091,REPLICATION://kafka-broker1:9091
> {code}
> advertises on the _PUBLIC_ listener _envoy-kafka-broker:19092_, however I would expect that _envoy-kafka-broker:9091_ is advertised. In ZooKeeper mode it works as expected.
> In a deployment with a L4 proxy in front of the Kafka cluster, it is important, that the advertised port can be different from the actual socket port.
> I tested it with a Docker-Compose setup which runs 3 Kafka Broker in Kraft mode and an Envoy proxy in front of them. With Apache Kafka 2.8.0 it does not work, because Kafka does not advertise the configured advertised port. For more details see: https://github.com/ueisele/kafka/tree/fix/kraft-advertisedlisteners-build/proxy-examples/proxyl4-kafkakraft-bug-2.8
> _Client -- 909[1-3] --> Envoy Proxy -- 19092 --> Kafka Broker [1-3]_
> || Envoy Host || Envoy Port || Kafka Broker || Kafka Port || Advertised Listener ||
> | envoy-kafka-broker | 9091 | kafka-broker1 | 19092 | envoy-kafka-broker:9091 |
> | envoy-kafka-broker | 9092 | kafka-broker2 | 19092 | envoy-kafka-broker:9092 |
> | envoy-kafka-broker | 9093 | kafka-broker3 | 19092 | envoy-kafka-broker:9093 |
> {code:bash}
> > docker-compose exec kafkacat kafkacat -b envoy-kafka-broker:9091 -L
> Metadata for all topics (from broker -1: envoy-kafka-broker:9091/bootstrap):
>  3 brokers:
>   broker 101 at envoy-kafka-broker:19092
>   broker 102 at envoy-kafka-broker:19092 (controller)
>   broker 103 at envoy-kafka-broker:19092
>  0 topics:
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)