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] External kafka broker connectivity with ClusterIP opening a different port for each Kafka broker #25142

Open
venkatne opened this issue Apr 11, 2024 · 4 comments
Assignees
Labels
kafka on-hold Issues or Pull Requests with this label will never be considered stale

Comments

@venkatne
Copy link

venkatne commented Apr 11, 2024

image

I am also getting same issue

kafkacat -b test-kafka.ne-dev-internal.net:9095 -L
Metadata for all topics (from broker 0: test-kafka.ne-dev-internal.net:9095/0):
 3 brokers:
  broker 0 at test-kafka.ne-dev-internal.net:9095 (controller)
  broker 1 at test-kafka.ne-dev-internal.net:9096
  broker 2 at test-kafka.ne-dev-internal.net:9097

But svc opening only 9095

image

kubectl get svc -n kafka
NAME                          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
kafka                         ClusterIP   10.100.126.126   <none>        9092/TCP,9095/TCP            113m
kafka-connect                 ClusterIP   10.100.126.220   <none>        8083/TCP                     113m
kafka-controller-0-external   ClusterIP   10.100.215.160   <none>        9095/TCP                     113m
kafka-controller-1-external   ClusterIP   10.100.5.252     <none>        9095/TCP                     74m
kafka-controller-2-external   ClusterIP   10.100.130.54    <none>        9095/TCP                     74m
kafka-controller-headless     ClusterIP   None             <none>        9094/TCP,9092/TCP,9093/TCP   113m

Because of this we are getting error when try to produce messages

root@ip-162-30-10-101:/k8sconfig/k8s-venkat/kafka# kafkacat -b test-kafka.ne-dev-internal.net:9095 -t test
% Auto-selecting Consumer mode (use -P or -C to override)
% ERROR: Local: Broker transport failure: test-kafka.ne-dev-internal.net:9097/2: Connect to ipv4#162.30.22.46:9097 failed: Connection refused (after 0ms in state CONNECT)

Originally posted by @venkatne in #19429 (comment)

@github-actions github-actions bot added the triage Triage is needed label Apr 11, 2024
@venkatne venkatne changed the title ![image](https://github.com/bitnami/charts/assets/58163377/75243639-f75d-48e1-9fcb-28c9a26375e4) External kafka broker connectivity with cluster opened opening a different port for each Kafka broker Apr 11, 2024
@venkatne venkatne changed the title External kafka broker connectivity with cluster opened opening a different port for each Kafka broker External kafka broker connectivity with ClusterIP opening a different port for each Kafka broker Apr 11, 2024
@javsalgar javsalgar changed the title External kafka broker connectivity with ClusterIP opening a different port for each Kafka broker [bitnami/kafka] External kafka broker connectivity with ClusterIP opening a different port for each Kafka broker Apr 12, 2024
@javsalgar
Copy link
Contributor

Hi!

Could you share some sample values that reproduce the issue?

@venkatne
Copy link
Author

Here is the snippet block

listeners:
  client:
    containerPort: 9092
    protocol: PLAINTEXT
  controller:
    name: CONTROLLER
    containerPort: 9093
    protocol: PLAINTEXT
  interbroker:
    containerPort: 9094
    protocol: PLAINTEXT
  external:
    containerPort: 9095
    protocol: PLAINTEXT
sasl:
  enabledMechanisms: PLAIN,SCRAM-SHA-256,SCRAM-SHA-512
  interBrokerMechanism: PLAIN
  controllerMechanism: PLAIN
controller.persistence.size: 200Gi
controller.logPersistence.size: 200Gi
broker.persistence.size: 200Gi
broker.logPersistence.size: 200Gi
externalAccess:
  enabled: true
  autoDiscovery:
    enabled: false
  controller:
    service:
      type: ClusterIP
      domain: test-kafka.ne-dev-internal.net
      ports:
        external: 9095
  broker:
    service:
      type: ClusterIP
      domain: test-kafka.ne-dev-internal.net
      ports:
        external: 9095

@github-actions github-actions bot removed the triage Triage is needed label Apr 15, 2024
@github-actions github-actions bot assigned jotamartos and unassigned javsalgar Apr 15, 2024
@anuragwork1
Copy link

I got the same issue in my case as well. Here is the issue I have opened.

#25192

@jotamartos
Copy link
Contributor

Hi all,

As I just mentioned in the other issue, I've been checking the configuration and saw that this is generated by the EXTERNAL_ACCESS_PORT_AUTOINCREMENT env var

https://github.com/bitnami/charts/blob/main/bitnami/kafka/templates/_helpers.tpl#L809

and the configure_external_access method in the configmap

https://github.com/bitnami/charts/blob/main/bitnami/kafka/templates/scripts-configmap.yaml#L150

Would you like to contribute? You can follow our contributing guidelines and the whole community will benefit from this change. Our team will be more than happy to review the changes.

In the meantime, I'm going to create a task on our side to evaluate the changes but I can't provide you with an ETA on when they will be ready.

@jotamartos jotamartos added the on-hold Issues or Pull Requests with this label will never be considered stale label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kafka on-hold Issues or Pull Requests with this label will never be considered stale
Projects
None yet
Development

No branches or pull requests

4 participants