# Sending batch to Kafka failed. Will retry after a delay Logstash error

**URL:** <https://discuss.elastic.co/t/sending-batch-to-kafka-failed-will-retry-after-a-delay-logstash-error/114133>\
**Category:** Logstash\
**Created:** [January 4, 2018, 5:18pm UTC](https://discuss.elastic.co/t/sending-batch-to-kafka-failed-will-retry-after-a-delay-logstash-error/114133 "2018-01-04T17:18:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaoantoniopereira](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@joaoantoniopereira](https://discuss.elastic.co/u/joaoantoniopereira)\
**Post date:** [January 4, 2018, 5:18pm UTC](https://discuss.elastic.co/t/sending-batch-to-kafka-failed-will-retry-after-a-delay-logstash-error/114133/1 "2018-01-04T17:18:50Z")

</div>

Hi,  
I have a Logstash agent sending lines to a multi broker kafka setup.  
Currently I am getting the following error in Logstash log:

[2017-12-27T15:06:15,369][INFO][logstash.outputs.kafka] Sending batch to Kafka failed. Will retry after a delay. {:batch\_size=\>125, :failures=\>125, :sleep=\>0.01}  
[2017-12-27T15:06:15,370][INFO][logstash.outputs.kafka] Sending batch to Kafka failed. Will retry after a delay. {:batch\_size=\>125, :failures=\>125, :sleep=\>0.01}  
[2017-12-27T15:06:15,370][INFO][logstash.outputs.kafka] Sending batch to Kafka failed. Will retry after a delay. {:batch\_size=\>125, :failures=\>125, :sleep=\>0.01}  
[2017-12-27T15:06:15,371][INFO][logstash.outputs.kafka] Sending batch to Kafka failed. Will retry after a delay. {:batch\_size=\>125, :failures=\>125, :sleep=\>0.01}

Before I set this mutli broker scheme in production I tested on a single node local environment and got the same error. Nevertheless, I overcome this issue by adding the following line to kafka server.properties file:  
listeners=PLAINTEXT://192.168.1.70:9092  
This solution was taken from:

> [@Logstash output plugin kafka is not pushing data into kafka](https://discuss.elastic.co/t/logstash-output-plugin-kafka-is-not-pushing-data-into-kafka/104383/3):
>
> After updating all logstash plugins now i am seeing following logs [2017-10-18T19:55:36,794][INFO][logstash.outputs.kafka] Sending batch to Kafka failed. Will retry after a delay. {:batch\_size=\>6, :failures=\>6, :sleep=\>0.01} [2017-10-18T19:56:06,901][INFO][logstash.outputs.kafka] Sending batch to Kafka failed. Will retry after a delay. {:batch\_size=\>1, :failures=\>1, :sleep=\>0.01} [2017-10-18T19:56:06,903][INFO][logstash.outputs.kafka] Sending batch to Kafka failed. Will retry aft…

However in my multi node production setup I do not know how to change this setting.  
Should I put only the machine ip on the server.properties file of each broker. Or should I put all broker ips in each server.properties file?  
Thanks in advance!

---

<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 1, 2018, 5:19pm UTC](https://discuss.elastic.co/t/sending-batch-to-kafka-failed-will-retry-after-a-delay-logstash-error/114133/2 "2018-02-01T17:19:41Z")

</div>

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