0
votes

Able to connect successfully to local kafka broker/cluster running locally (dockerized) using Conduktor, but when trying to connect to Kafka cluster running on Unix VM, getting below error. Error: "The broker [...] is reachable but Kafka can't connect. Ensure you have access to the advertised listeners of the the brokers and the proper authorization"

Appreciate any assistance.

2

2 Answers

0
votes

running locally (dockerized)

When running in docker, you need to ensure that the ports are accessible from outside of your container. To verify this, try doing a telnet <ip> <port> and check if you are able to connect.

Since the error message says, the broker is reachable, I suppose you would be able to successfully telnet to the broker.

Next, check your broker config called advertised.listeners. Here you need to mention your IP:Port combination where IP is what you will be giving in your client program i.e. Conduktor.

An example for that would be

advertised.listeners=PLAINTEXT://1.2.3.4:9092

and then restart your broker and reconnect. If you are using ssl then you need to provide some extra configuration. See Configuring Kafka brokers for more.

0
votes

Try to add in /etc/hosts (Unix-like) or C:\Windows\System32\drivers\etc (windows-like) the Kafka server in such manner kafka_server_ip kafka_server_name_in_dns (e.g. 10.10.0.1 kafka).