# Filebeat could not send to the kafka

**URL:** <https://discuss.elastic.co/t/filebeat-could-not-send-to-the-kafka/293528>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 5, 2022, 11:18am UTC](https://discuss.elastic.co/t/filebeat-could-not-send-to-the-kafka/293528 "2022-01-05T11:18:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![flover97](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flover97/32/99858_2.png) [@flover97](https://discuss.elastic.co/u/flover97)\
**Post date:** [January 5, 2022, 11:18am UTC](https://discuss.elastic.co/t/filebeat-could-not-send-to-the-kafka/293528/1 "2022-01-05T11:18:35Z")

</div>

Hello everyone, I ran into a problem that filebeat does not send data to kafka. Filebeat connects exactly to the kafka as it creates an empty topic, but the data does not come, I see no errors in the debug. Could there be a problem that I am connecting via haproxy?

filebeat version 7.16.2 (amd64), libbeat 7.16.2 [3c518f4d17a15dc85bdd68a5a03d5af51d9edd8e built 2021-12-18 21:04:19 +0000 UTC]

filebeat.yml

```auto
filebeat.inputs:

#- type: log
# enabled: true
# paths:
# - "/var/log/nginx/skks-body.log"

filebeat.inputs:
  - type: stdin

output.kafka:
  hosts:
      - "192.168.1.35:9093"
  username: "admin"
  password: "pass"
  topic: 'test'
  partition.round_robin:
    reachable_only: false

  required_acks: 1
  compression: gzip
  max_message_bytes: 1000000

filebeat.config.modules.path: modules.d/*.yml

```

haproxy conf:  
 ![изображение](https://us1.discourse-cdn.com/elastic/original/3X/6/a/6abc989df36e120d46ebb088f70835eac14595c9.png)

Autocreated topic:

 ![Screenshot_20220105_141330](https://us1.discourse-cdn.com/elastic/original/3X/3/1/31496b4cfeff0b8a643a68a13ae94c66215d0955.png)

filebeat -e -d "\*"

 ![изображение](https://us1.discourse-cdn.com/elastic/original/3X/5/2/529a416b912fdc1fe92f899d3290fbb4d5ef9502.jpeg)

---

<div class="post-metadata">

**Author:** ![flover97](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flover97/32/99858_2.png) [@flover97](https://discuss.elastic.co/u/flover97)\
**Post date:** [January 5, 2022, 2:41pm UTC](https://discuss.elastic.co/t/filebeat-could-not-send-to-the-kafka/293528/2 "2022-01-05T14:41:29Z")

</div>

sorry, in kafka need to set advertised.listeners

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 2, 2022, 4:42pm UTC](https://discuss.elastic.co/t/filebeat-could-not-send-to-the-kafka/293528/3 "2022-02-02T16:42:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
