Reputation: 151
I am trying to create a Kafka producer from command prompt using below command and getting this error message. This was working fine on my laptop but failing when I tried the same on a virtual machine. Any help will be greatly appreciated.
*C:\kafka_2.12-0.10.2.1\bin\windows>kafka-console-producer.bat --broker-list localhost:9092 --topic test
[2020-10-31 10:53:55,832] WARN [Producer clientId=console-producer] Bootstrap broker vagrant-10:9092 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient)*
Upvotes: 0
Views: 1486
Reputation: 1
Try this- Under the bin location
./kafka-console-producer --bootstrap-server localhost:9092 --topic your topic name
Upvotes: 0
Reputation: 192023
Your Kafka VM has advertised.listeners including vagrant-10:9092
Your host likely cannot resolve this DNS name
Fix your listeners configuration
Upvotes: 0