I'm running Logstash 7.0.0. It is using a filebeat input to read logs from described files and output is going to kafka. I am getting my logs correctly for some time post starting logstash. Then i get below error and no output is recieved even the small logs of less size in kafka. During this time logstash output is choked for any log (even of small size) why?
After few hours i get following error in my logstash which is given in the screen shot
the following error keeps comming until i stop logstash and start again.
You can use the retries option so that attempts to write to kafka are only retried a limited number of times, but note that that includes when kafka is down. You will lose data.
There is no option in the kafka output to treat oversized objects differently to other errors.
You could use an ugly hack that estimates the size by converting the object to a string and checking its length. This will drop events whose string representation is more than 230 bytes...
ruby {
code => '
if event.to_hash.to_s.length > 230
event.cancel
end
'
}
You could write additional code to better approximate the size of the serialized data, all the way up to calling org.apache.kafka.common.serialization.StringSerializer yourself, although this has the overhead of doing the serialization twice.
[2019-09-03T15:12:15,582][ERROR][logstash.plugins.registry] Tried to load a plugin's code, but failed. {:exception=>#<LoadError: no such file to load -- logstash/outputs/ruby>, :path=>"logstash/outputs/ruby", :type=>"output", :name=>"ruby"}
[2019-09-03T15:12:15,599][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::PluginLoadingError", :message=>"Couldn't find any output plugin named 'ruby'. Are you sure this is correct? Trying to load the ruby output plugin resulted in this error: no such file to load -- logstash/outputs/ruby", :backtrace=>["/opt/logstash/logstash-core/lib/logstash/plugins/registry.rb:211:in lookup_pipeline_plugin'", "/opt/logstash/logstash-core/lib/logstash/plugin.rb:137:inlookup'", "org/logstash/plugins/PluginFactoryExt.java:200:in plugin'", "org/logstash/plugins/PluginFactoryExt.java:137:inbuildOutput'", "org/logstash/execution/JavaBasePipelineExt.java:50:in initialize'", "/opt/logstash/logstash-core/lib/logstash/java_pipeline.rb:23:ininitialize'", "/opt/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "/opt/logstash/logstash-core/lib/logstash/agent.rb:325:inblock in converge_state'"]}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.