[bitnami/kafka] Using external access with type NodePort and autodiscovery fails for brokers.
Name and Version
bitnami/kafka 24.0.10
What architecture are you using?
amd64
What steps will reproduce the bug?
Install the chart with the values specified below.
Are you using any custom parameters or values?
controller:
replicaCount: 1
broker:
replicaCount: 1
externalAccess:
enabled: true
broker:
service:
type: NodePort
ports:
external: 9094
domain: ""
controller:
service:
type: NodePort
ports:
external: 9094
domain: ""
autoDiscovery:
enabled: true
serviceAccount:
create: true
rbac:
create: true
What is the expected behavior?
Expecting both the broker and controller to start up normally, with the correct advertised.listeners settings.
What do you see instead?
Controllers starts up normally as expected, but broker fails with the following error:
kafka 15:58:24.90
kafka 15:58:24.90 Welcome to the Bitnami kafka container
kafka 15:58:24.90 Subscribe to project updates by watching https://github.com/bitnami/containers
kafka 15:58:24.90 Submit issues and feature requests at https://github.com/bitnami/containers/issues
kafka 15:58:24.91
kafka 15:58:24.91 INFO ==> ** Starting Kafka setup **
kafka 15:58:24.95 INFO ==> Initializing KRaft storage metadata
kafka 15:58:24.96 INFO ==> Adding KRaft SCRAM users at storage bootstrap
kafka 15:58:24.96 INFO ==> Formatting storage directories to add metadata...
Exception in thread "main" java.lang.IllegalArgumentException: Error creating broker listeners from 'CLIENT://kafka-broker-0.kafka-broker-headless.default.svc.cluster.local:9092,INTERNAL://kafka-broker-0.kafka-broker-headless.default.svc.cluster.local:9094,EXTERNAL://192.168.65.4:': Unable to parse EXTERNAL://192.168.65.4: to a broker endpoint
at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:254)
at kafka.server.KafkaConfig.effectiveAdvertisedListeners(KafkaConfig.scala:2087)
at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:2199)
at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:2160)
at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1568)
at kafka.tools.StorageTool$.$anonfun$main$1(StorageTool.scala:50)
at scala.Option.flatMap(Option.scala:271)
at kafka.tools.StorageTool$.main(StorageTool.scala:50)
at kafka.tools.StorageTool.main(StorageTool.scala)
Caused by: org.apache.kafka.common.KafkaException: Unable to parse EXTERNAL://192.168.65.4: to a broker endpoint
at kafka.cluster.EndPoint$.createEndPoint(EndPoint.scala:58)
at kafka.utils.CoreUtils$.$anonfun$listenerListToEndPoints$6(CoreUtils.scala:251)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:38)
at scala.collection.TraversableLike.map(TraversableLike.scala:286)
at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
at scala.collection.AbstractTraversable.map(Traversable.scala:108)
at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:251)
... 8 more
Seems that the port of the NodePort is somehow lost in the broker, but not in the controller.
Hi @LuxTheDude ,
Seems indeed the external broker port is not being processed as it should be both in the chart or in the container logic. I will raise an internal task to dig into this. We will reach you back here as soon as our team's workload allow us to finish the task.
Is there any new progress on this issue I have the same problem now
I have the same problem now