New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logstash with Kafka: Unable to decode avro #12

Closed
mohitgargk opened this Issue Oct 19, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@mohitgargk

mohitgargk commented Oct 19, 2015

My schema file (user.avsc) is -

{"namespace": "example.avro",
"type": "record",
"name": "User",
"fields": [
{"name": "name", "type": "string"},
{"name": "favorite_number", "type": ["int", "null"]},
{"name": "favorite_color", "type": ["string", "null"]}
]
}

And logstash config file:

input {
kafka {
zk_connect => "localhost:2181"
topic_id => "MemoryTest"
type => "standard_event"
group_id => "butiline_dash_prod"
reset_beginning => true
auto_offset_reset => smallest
codec => {
avro => {
schema_uri => "/opt/ELK/logstash-1.5.4/bin/user.avsc"
}
}
}
}
}

I am getting error on logstash console as:

Alyssa�blue {:exception=>#<NoMethodError: undefined method decode' for ["avro", {"schema_uri"=>"/opt/ELK/logstash-1.5.4/bin/user.avsc"}]:Array>, :backtrace=>["/opt/ELK/logstash-1.5.4/vendor/bundle/jruby/1.9/gems/logstash-input-kafka-1.0.0/lib/logstash/inputs/kafka.rb:169:in queue_event'", "/opt/ELK/logstash-1.5.4/vendor/bundle/jruby/1.9/gems/logstash-input-kafka-1.0.0/lib/logstash/inputs/kafka.rb:139:inrun'", "/opt/ELK/logstash-1.5.4/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.4-java/lib/logstash/pipeline.rb:177:in inputworker'", "/opt/ELK/logstash-1.5.4/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.4-java/lib/logstash/pipeline.rb:171:in`start_input'"], :level=>:error}

@original-brownbear original-brownbear self-assigned this May 8, 2017

@original-brownbear

This comment has been minimized.

Show comment
Hide comment
@original-brownbear

original-brownbear May 8, 2017

Contributor

@suyograo @jsvd looking into the Kafka issue from https://discuss.elastic.co/t/logstash-kafka-avro-codec-error-with-doubles/79483 here (this one looks a little different, but the underlying issue in the forum post blocks this one too imo). Though it looks like the fix is rather going to be in the kafka plugin than here.

Contributor

original-brownbear commented May 8, 2017

@suyograo @jsvd looking into the Kafka issue from https://discuss.elastic.co/t/logstash-kafka-avro-codec-error-with-doubles/79483 here (this one looks a little different, but the underlying issue in the forum post blocks this one too imo). Though it looks like the fix is rather going to be in the kafka plugin than here.

@suyograo

This comment has been minimized.

Show comment
Hide comment
@suyograo

suyograo May 19, 2017

Contributor

Fixed in #24

Contributor

suyograo commented May 19, 2017

Fixed in #24

@suyograo suyograo closed this May 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment