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

Cannot retrieve broker configs #7

Closed
KimMJ opened this issue Oct 24, 2019 · 3 comments
Closed

Cannot retrieve broker configs #7

KimMJ opened this issue Oct 24, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@KimMJ
Copy link

KimMJ commented Oct 24, 2019

Hi.
I want to connect extension to kafka on Kubernetes.

I use vscode with remote-ssh extension to access to pc.
And I download kafka extension and try to connect to my kafka.

First I try to connect with kafka's cluster ip(10.99.116.43), but it failed.
In vscode-kafka, it shows Topics and brokers but couldn't see Topics' config.
Cause brokers' IP in extension is changed to dns name (kafka-service1.kafka.svc.cluster.local), I just add cluster ip to /etc/hosts.
Now I can see Topics' config but not Brokers' config.
I got error like

Unexpected broker id, expected 1 or empty string, but received ConfigResource(type=BROKER, name='3').name

at all brokers.

here is some info about kubernetes kafka service.

NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/kafka-service1      ClusterIP   10.99.116.43     <none>        9092/TCP                     13d
service/kafka-service2      ClusterIP   10.111.69.121    <none>        9092/TCP                     13d
service/kafka-service3      ClusterIP   10.106.89.252    <none>        9092/TCP                     13d
service/zookeeper-server1   ClusterIP   10.101.231.163   <none>        2181/TCP,2888/TCP,3888/TCP   13d
service/zookeeper-server2   ClusterIP   10.111.122.232   <none>        2181/TCP,2888/TCP,3888/TCP   13d
service/zookeeper-server3   ClusterIP   10.102.63.165    <none>        2181/TCP,2888/TCP,3888/TCP   13d

This is env in kafka1

      KAFKA_MESSAGE_MAX_BYTES:           41943040
      KAFKA_DEFAULT_REPLICATION_FACTOR:  3
      KAFKA_REPLICATION_FACTOR:          3
      KAFKA_BROKER_ID:                   1
      KAFKA_LOG_DIRS:                    /kafka/logs
      KAFKA_ADVERTISED_PORT:             9092
      KAFKA_ADVERTISED_HOST_NAME:        kafka-service1.kafka.svc.cluster.local
      KAFKA_ZOOKEEPER_CONNECT:           zookeeper-server1.kafka.svc.cluster.local:2181,zookeeper-server2.kafka.svc.cluster.local:2181,zookeeper-server3.kafka.svc.cluster.local:2181

And when I click Broker 1 config

Unexpected broker id, expected 2 or empty string, but received ConfigResource(type=BROKER, name='1').name
@jlandersen
Copy link
Owner

Hi @KimMJ

Sorry, this is a known issue in https://github.com/SOHU-Co/kafka-node. I fixed it upstream (SOHU-Co/kafka-node#1280) but the change is still awaiting the original author publishing a new version of the library to npm. As soon as it is available I will provide an update to the extension.

@jlandersen jlandersen added the bug Something isn't working label Oct 27, 2019
@jlandersen jlandersen changed the title connect to kubernetes kafka Cannot retrieve broker configs Nov 6, 2019
@jlandersen
Copy link
Owner

I just published 0.8.0 which brings in latest kafka-node (5.0.0) that includes my upstream fix. Can you try make sure you are on the latest version (rolling out now) and verify that it fixes the issue for you?

@KimMJ
Copy link
Author

KimMJ commented Nov 13, 2019

Sorry for late! It works very well after updated. Thx!!

@KimMJ KimMJ closed this as completed Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants