Tag Archives: Win 10 Kafka error

[Solved] Win 10 Kafka error: failed to construct Kafka consumer

After updating the code, the package succeeds, but an error is reported when the project is started. The error information is shown in the following figure:

I mean, it is obvious that the problem lies in Kafka. After looking at the configuration, it should be the port problem.

Instead of using IP configuration, I directly configured the port name in the host file, as shown in the following figure:

Add configuration 127.0.0.1 Kafka-server

Then change the service address of Kafka to kafka-server:9092 in the application configuration file of the project