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

How can I check if advertised.listeners is defined in Kafka / zookeeper config ? #3447

Closed
smichaut opened this issue Jul 7, 2021 · 1 comment

Comments

@smichaut
Copy link

smichaut commented Jul 7, 2021

Hi,
I have a C client which interacts with Kafka using librdkafka. When starting I perform a few check such as calling rd_kafka_metadata (that calls rd_kafka_broker_any_usable which checks that the given broker in my config are up)...
When running in docker if I 'forget' to set the advertised listener variable (KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://:) everything works well and I am able to catch the error.
But with Kubernetes, making a deployment (with image: lensesio/fast-data-dev) if I don't set KAFKA_ADVERTISED_HOST_NAME, I have no error, but the client hangs when trying to read data from Kafka without any errors... So the problem is hard to diagnose.

My goal is to be able to detect there is something missing in the configuration (i.e; since the advertised listener or host name variable hasn't been set, I assume something is missing in Kakfa/Zookeeper config) that will prevent to consume topic in a K8S environment. So my guess is to check if the advertised.listener properties (or any other property) is correctly set... How can I do this with librdkafka (or any other mean) ?

Thanks for any suggestion/help

@edenhill
Copy link
Contributor

edenhill commented Apr 8, 2022

You could try connecting with a client.

@edenhill edenhill closed this as completed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants