Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/kafka] Using external access with type NodePort and autodiscovery fails for brokers. #18419

Open
LuxTheDude opened this issue Aug 14, 2023 · 3 comments
Labels
in-progress kafka on-hold Issues or Pull Requests with this label will never be considered stale tech-issues The user has a technical issue about an application

Comments

@LuxTheDude
Copy link
Contributor

LuxTheDude commented Aug 14, 2023

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.

@LuxTheDude LuxTheDude added the tech-issues The user has a technical issue about an application label Aug 14, 2023
@github-actions github-actions bot added the triage Triage is needed label Aug 14, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Aug 16, 2023
@aoterolorenzo
Copy link
Contributor

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.

@aoterolorenzo aoterolorenzo added the on-hold Issues or Pull Requests with this label will never be considered stale label Aug 17, 2023
@sungaomeng
Copy link

Is there any new progress on this issue
I have the same problem now

@xzplays
Copy link

xzplays commented Feb 23, 2024

I have the same problem now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress kafka on-hold Issues or Pull Requests with this label will never be considered stale tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

6 participants
@aoterolorenzo @carrodher @LuxTheDude @xzplays @sungaomeng and others