I’m running the confluent platform in wsl 2(Ubuntu Distribution) and I also running a Spring application on Windows but when I send a message with a producer I have this error:
Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected
I have a look this articles:
Confluent
Running Kafka Connect (Sink) On Separate Machine From Zookeeper & Topic (non localhost)
Kafka Connect
Greetings,
Beginner Problem:
I’m running a Kafka environment (machine #1) on a standalone machine and MySQL on a separate machine (machine #2). The Kafka environment is running well, with an Avro(ized) topic. My goal is to use a Connector to sink the data from the topic to the MySQL database.
However, when I attempt to start up the Connect instance on the database machine (#2) -pointed to the zookeeper socket of the Kafka environment (#1) -, I receive the following message:
WARN [AdminClien…
Confluent
but I don’t find the solution.
How is the configuration in confluent/etc/kafka/server.properties file?
I set this configuration:
advertised.listeners=PLAINTEXT://127.0.0.1:9092
listener.security.protocol.map=PLAINTEXT:PLAINTEXT
listeners=PLAINTEXT://0.0.0.0:9092
But It doesn’t work my spring boot application on Windows…
With this command I can see all is ok:
confluent local services status
Kafka is running on: “localhost:9092” and within WSL2 I can send (producer) and read messages (consumer) correctly but it doesn’t work my spring boot application on Windows.
Could you please advice how to solve this error?
Thanks in advance!
ip addr | grep eth0
on Ubuntu terminal I can get external interface IP, I set this IP on advertised.listener
and with the command
netsh interface portproxy add v4tov4 listenport=9092 listenaddress=0.0.0.0 connectport=9092 connectaddress=XXX.XX.XX.XX
being XXX.XX.XX.XX the external interface IP and put this command on Windows cmd I can forward ports.
With the command netstat -ab
I can see on Windows cmd the IP and Port TCP 0.0.0.0:9092. It works correctly!