Closed nmarasoiu closed 4 years ago
Version 1.5.0 MacOs El Capitain
Ok, with docker it is more clear what is happening:
(base) NicuMarasoius-MacBook-Pro-3:kafka nicu$ docker run -it --network=host edenhill/kafkacat:1.5.0 -b 169.254.212.189 -t t
% Auto-selecting Consumer mode (use -P or -C to override)
% Reached end of topic t [0] at offset 0
Perhaps removing that warning (which is misleading to some) would be worth it? Does it really try to connect locally ?
Also, the topic t has 16 million messages according to control center, and i can see them on 169.254.212.189 control center in topic t
Running without network=host (I have docker in virtualbox):
% Auto-selecting Consumer mode (use -P or -C to override)
% ERROR: Local: Broker transport failure: localhost:9092/1: Connect to ipv4#127.0.0.1:9092 failed: Connection refused (after 0ms in state CONNECT)```
The broker is advertising itself as localhost through advertisted.listeners.
You can see this by kafkacat -b bootstrap -L
See this blog post for more info https://rmoff.net/2018/08/02/kafka-listeners-explained/
I am trying to connect to a remote Kafka broker to consume, but it tries locally: Pls help me understand why, thanks,