# Logstash not reading message from Kafka

**URL:** <https://discuss.elastic.co/t/logstash-not-reading-message-from-kafka/88980>\
**Category:** Logstash\
**Created:** [June 12, 2017, 7:07am UTC](https://discuss.elastic.co/t/logstash-not-reading-message-from-kafka/88980 "2017-06-12T07:07:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chittaranjan\_Sardar](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@Chittaranjan\_Sardar](https://discuss.elastic.co/u/Chittaranjan_Sardar)\
**Post date:** [June 12, 2017, 7:07am UTC](https://discuss.elastic.co/t/logstash-not-reading-message-from-kafka/88980/1 "2017-06-12T07:07:58Z")

</div>

I am testing a simple pipeline - Filebeat \> Fafka \> Logstash \> File.

Logstash is not reading from Kafka, but I see Kafka has messages when i use this command -

> bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic MyTopic --from-beginning

My file beat configuration -

> filebeat.prospectors:
> 
> - input\_type: log  
> paths:
> - /root/LogData/input.log

> output.kafka:  
> hosts: ["10.290.18.14:9092"]

> topic: MyTopic  
> partition.round\_robin:  
> reachable\_only: false

> required\_acks: 1  
> compression: none  
> max\_message\_bytes: 1000000

My Logstash configuration -

> input {  
> kafka {  
> bootstrap\_servers =\> "localhost:9092"  
> topics =\> ["MyTopic"]  
> }

> }

> output {  
> file {  
> path =\> "/usr/share/logstash/test\_out.log"  
> }  
> }

My Fafka & Logstash are running on same VM, I am using Logstash docker, I started the docker of Logstash as follows -

> sudo docker run -d --name logstash --expose 25826 -p 25826:25826 [docker.elastic.co/logstash/logstash:5.4.0](http://docker.elastic.co/logstash/logstash:5.4.0) --debug

Filebeat running on different VM.  
I am creating topic as follows -

> bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic MyTopic

I am using -  
kafka\_2.11-0.10.2.0  
Logstash 5.4  
Filebeat 5.4  
(I tried without docker, directly on Ubuntu, but still not working)

---

<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:** [July 10, 2017, 7:07am UTC](https://discuss.elastic.co/t/logstash-not-reading-message-from-kafka/88980/2 "2017-07-10T07:07:58Z")

</div>

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