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:
and
and
but I don’t find the solution.
How is the configuration in confluent/etc/kafka/server.properties file?
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!