# Logstash5.4 output kafka problem

**URL:** <https://discuss.elastic.co/t/logstash5-4-output-kafka-problem/85533>\
**Category:** Logstash\
**Created:** [May 12, 2017, 9:43am UTC](https://discuss.elastic.co/t/logstash5-4-output-kafka-problem/85533 "2017-05-12T09:43:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wongchao](https://avatars.discourse-cdn.com/v4/letter/w/839c29/32.png) [@wongchao](https://discuss.elastic.co/u/wongchao)\
**Post date:** [May 12, 2017, 9:43am UTC](https://discuss.elastic.co/t/logstash5-4-output-kafka-problem/85533/1 "2017-05-12T09:43:40Z")

</div>

kafka 0.9.0.1  
centos 6.5  
logstash 5.4

with the following config, logstash2.4 can output data to kafka topic, but failed with logatsh5.4.  
i don't know why.

* * *

input{  
file {  
path =\> "/home/wangchao/api2.log"  
start\_position =\> "end"  
}  
}

output {  
kafka {  
bootstrap\_servers =\> "test:9092"  
codec =\> plain {  
format =\> "%{message}"  
}  
topic\_id =\> "interfaceAccess\_API"  
}  
}

---

<div class="post-metadata">

**Author:** ![wongchao](https://avatars.discourse-cdn.com/v4/letter/w/839c29/32.png) [@wongchao](https://discuss.elastic.co/u/wongchao)\
**Post date:** [May 12, 2017, 9:53am UTC](https://discuss.elastic.co/t/logstash5-4-output-kafka-problem/85533/2 "2017-05-12T09:53:47Z")

</div>

[2017-05-12T17:53:28,283][DEBUG][logstash.inputs.file] each: file grew: /home/wangchao/api2.log: old size 190, new size 199  
[2017-05-12T17:53:28,284][DEBUG][logstash.inputs.file] Received line {:path=\>"/home/wangchao/api2.log", :text=\>"xxxxx222"}  
[2017-05-12T17:53:28,306][DEBUG][logstash.inputs.file] writing sincedb (delta since last write = 1494582808)  
[2017-05-12T17:53:28,312][DEBUG][logstash.pipeline] filter received {"event"=\>{"path"=\>"/home/wangchao/api2.log", "@timestamp"=\>2017-05-12T09:53:28.303Z, "@version"=\>"1", "host"=\>"0.0.0.0", "message"=\>"xxxxx222"}}  
[2017-05-12T17:53:28,316][DEBUG][logstash.pipeline] output received {"event"=\>{"path"=\>"/home/wangchao/api2.log", "@timestamp"=\>2017-05-12T09:53:28.303Z, "@version"=\>"1", "host"=\>"0.0.0.0", "message"=\>"xxxxx222"}}  
[2017-05-12T17:53:32,204][DEBUG][logstash.pipeline] Pushing flush onto pipeline

---

<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:** [June 9, 2017, 10:06am UTC](https://discuss.elastic.co/t/logstash5-4-output-kafka-problem/85533/3 "2017-06-09T10:06:48Z")

</div>

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