Failed to connect to output kafka, retrying in 15s, error was 'kafka: client has run out of available brokers to talk to (Is your cluster reachable?)'

Hi I am new to telegraf and Kafka. I am trying to make telegraf as producer of kafka. They are placed on different machine on same network.
I also tried it by opening the ports. If someone know how to get rid of following errors. Please reply Asap.

I am getting the following errors

****E! [agent] Failed to connect to output kafka, retrying in 15s, error was 'kafka: client has run out of available brokers to talk to (Is your cluster reachable?)'

** E! [telegraf] Error running agent: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)**

Note:
They are working fine if they are placed on same machine.