Skip to content
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
Closed

Logstash with Kafka: Unable to decode avro #12

mohitgargk opened this issue Oct 19, 2015 · 2 comments
Assignees

Comments

@mohitgargk
Copy link

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
Copy link
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.

@suyograo
Copy link
Contributor

Fixed in #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants