Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.3.1
-
None
-
None
Description
It's not possible to bind two listeners to two distinct network interfaces using the same port
listeners=ONE://<ip1>:9092,TWO://<ip2>:9092 advertised.listeners=ONE://<hostname1>:9092,TWO://<hostname2>:9092 listener.security.protocol.map=ONE:PLAINTEXT,TWO:PLAINTEXT
Kafka server returns an error:
[2019-12-02 13:07:18,256] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$) java.lang.IllegalArgumentException: requirement failed: Each listener must have a different port, listeners: ONE://<ip1>:9092,TWO://<ip2>:9092 at scala.Predef$.require(Predef.scala:281) at kafka.utils.CoreUtils$.validate$1(CoreUtils.scala:305) at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:316) at kafka.server.KafkaConfig.advertisedListeners(KafkaConfig.scala:1407) at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1482) at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1460) at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1114) at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:1094) at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:28) at kafka.Kafka$.main(Kafka.scala:68) at kafka.Kafka.main(Kafka.scala)