6
votes

I am facing below error message when i was trying to connect and see the topic/consumer details of one of my kafka clusters we have.

we have 3 brokers in the cluster which I able to see but the topic and its partitions.

enter image description here

Note : I have kafka 1.0 and kafka tool version is 2.0.1

4
You are going to have to post more details than this. What does your server.properties file look like? What are your consumer/producer details?Simon Clark
Does it work if you use kafkacat or kafka-console-consumer to read some messages?Robin Moffatt
@RobinMoffatt yes it does work with console producer and consumer with given same cofig.Indrajeet Gour
@SimonClark what property you want from server.properties file?Indrajeet Gour
If it works with those, then it sounds like an issue specific to the tool you're using maybe.Robin Moffatt

4 Answers

6
votes

I had the same issue on my MacBook Pro. The tool was using "tshepo-mbp" as the hostname which it could not resolve. To get it to work I added 127.0.0.1 tshepo-mbp to the /etc/hosts file.

2
votes

kafka tool is most likely using the hostname to connect to the broker and cannot reach it. You maybe connecting to the zookeeper host by IP address but make sure you can connect/ping the host name of the broker from the machine running the kafka tool.

If you cannot ping the broker either fix the network issues or as a workaround edit the host file on your client to let it know how to reach the broker by its name

2
votes

This issue occurs if you have not set listeners and advertised.listeners property in server.properties file.

For Ex: config/server.properties

...
listeners=PLAINTEXT://:9092
...
advertised.listeners=PLAINTEXT://<public-ip/host-name>:9092
...
0
votes
For better visibility (even already commented the same in early days thread)

In my case, I got to know when I used Kafkatool from my local machine, tool tris to find out Kafka broker port which was blocked from my cluster admins for my local machine, that is the reason I was not able to connect.

Resolution:

Either ask the admin to open the port for intranet if they can, if they can not you can use tunnelling for your testing purpose or time being for your port.

Hope this would help a few.