# Logstash doesn't receive logs from kafka (filebeat transfer logs to kafka)

**URL:** https://discuss.elastic.co/t/logstash-doesnt-receive-logs-from-kafka-filebeat-transfer-logs-to-kafka/311972
**Category:** Beats
**Tags:** filebeat
**Created:** [August 12, 2022, 4:02am UTC](https://discuss.elastic.co/t/logstash-doesnt-receive-logs-from-kafka-filebeat-transfer-logs-to-kafka/311972 "2022-08-12T04:02:48Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [August 18, 2022, 4:52am UTC](https://discuss.elastic.co/t/logstash-doesnt-receive-logs-from-kafka-filebeat-transfer-logs-to-kafka/311972/9 "2022-08-18T04:52:07Z")

</div>

> [@NAM\_VO](#):
>
> Is there anyway we can troubleshoot the problem which is filebeat is failing to write to kafka

The first thing you should check is the communication from the filebeat machine to the machine running your kafka, a telnet on port `9092` would tell you if you your windows machine can connect to kafka port.

After that you need to check your kafka configuration, the `listeners` and `advertised.listeners`, you need to have a listener and an advertised listener on the private IP of your server.

Normally I use this configuration for listeners (on controlled environments where I do not need TLS/SSL).

```auto
# listener
advertised.listeners=INTERNAL://localhost:9093,EXTERNAL://private-ip:9092
listeners=INTERNAL://localhost:9093,EXTERNAL://private-ip:9092
listener.security.protocol.map = INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
inter.broker.listener.name = INTERNAL

```

---

_[View the full topic](https://discuss.elastic.co/t/logstash-doesnt-receive-logs-from-kafka-filebeat-transfer-logs-to-kafka/311972)._
