Avro plugin logstash issue


(Venkat Venkat) #1

I have installed logstash avro plugin "bin/logstash-plugin install logstash-codec-avro" and I am using below config

input {
kafka {
topics => 'cdn'
bootstrap_servers => 'XXXXXXXX:9092,XXXXXXXXXXX:9092,XXXXXXXXXX:9092,XXXXXXXXX:9092'
group_id => 'playerstats-cdn'
codec => "avro" {
schema_uri => "/usr/share/logstash/schema.avsc"
}
add_field => { "projecttype" => "playerstats-cdn" }
consumer_threads => 5
}
}

output {
if [projecttype] == "playerstats-cdn" {
elasticsearch {
hosts => ['XXXXXXXX:9200','XXXXXXXXX:9200','XXXXXXXXXXXX:9202','XXXXXXXXXXXX:9202']
index => "cdn-%{+YYYY.MM.dd}"
}

stdout{ codec => json }
}
}

I am getting the below error:

[ERROR] 2017-10-19 20:18:39.688 [LogStash::Runner] registry - Problems loading a plugin with {:type=>"codec", :name=>""avro"", :path=>"logstash/codecs/"avro"", :error_message=>"NameError", :error_class=>NameError, :error_backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:226:in namespace_lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:162:inlegacy_lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:138:in lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:180:inlookup_pipeline_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/plugin.rb:140:in lookup'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:103:inplugin'", "(eval):8:in initialize'", "org/jruby/RubyKernel.java:1079:ineval'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:75:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:165:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:286:in create_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:95:inregister_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:313:in execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:204:in run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in `(root)'"]}
[ERROR] 2017-10-19 20:18:39.714 [LogStash::Runner] agent - Cannot create pipeline {:reason=>"Couldn't find any codec plugin named '"avro"'. Are you sure this is correct? Trying to load the "avro" codec plugin resulted in this error: Problems loading the requested plugin named "avro" of type codec. Error: NameError NameError"}

please help me out!!!


(system) #2

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