# Logstash avro reader gives empty results

**URL:** https://discuss.elastic.co/t/logstash-avro-reader-gives-empty-results/184032
**Category:** Logstash
**Created:** [June 3, 2019, 5:45pm UTC](https://discuss.elastic.co/t/logstash-avro-reader-gives-empty-results/184032 "2019-06-03T17:45:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rahulkothanath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahulkothanath/32/99122_2.png) [@rahulkothanath](https://discuss.elastic.co/u/rahulkothanath)
#### Post date: [June 3, 2019, 5:45pm UTC](https://discuss.elastic.co/t/logstash-avro-reader-gives-empty-results/184032/1 "2019-06-03T17:45:58Z")

</div>

I want to read a avro files from kafka topics and insert into elastic search.  
when I am reading avro files and showing results(codec=\>json) ,it gives empty.  
below is my configuration:

```
input
{
kafka {
bootstrap_servers =>"servers"
topics => ["topic"]
group_id => "group id"
auto_offset_reset => "latest"

    codec => avro {
        schema_uri => "/app/kn00/logstash-7.0.0/schemas/abc/abc_schema_writer.avsc"
    }

jaas_path => "/app/logstash-7.0.0/zookeeper-jaas_tmx.conf"
sasl_kerberos_service_name => "kafka"
kerberos_config => "/app/logstash-7.0.0/krb5.conf"
#sasl_mechanism => "PLAIN"
security_protocol => "SASL_SSL"
ssl_truststore_location => "/app/kafka-security.jks"
ssl_truststore_password => ""
}
}

output {

stdout{ codec => json }

    elasticsearch {
      hosts => ['url']
       user => 'abcedf'
       password => ''
       ssl => true
       truststore => "/app/kafka-security.jks"
      truststore_password => ""
       index => "dev_abc_error"
      # document_id => ""
       document_type => "_doc"
 }}

```

and the output is like below:  
/app/logstash-7.0.0/vendor/bundle/jruby/2.5.0/gems/awesome\_print-1.7.0/lib/awesome\_print/formatters/base\_formatter.rb:31: warning: constant ::Fixnum is deprecated  
{  
"name" =\> "",  
"value" =\> "",  
"@version" =\> "1",  
"@timestamp" =\> 2019-06-03T17:19:31.204Z  
}  
{  
"name" =\> "",  
"value" =\> "",  
"@version" =\> "1",  
"@timestamp" =\> 2019-06-03T17:19:31.221Z  
}

I am able to read the same avro records using NiFi and able to index into elastic search.

thanks for reading and helping

---

<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 1, 2019, 5:45pm UTC](https://discuss.elastic.co/t/logstash-avro-reader-gives-empty-results/184032/2 "2019-07-01T17:45:59Z")

</div>

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