I am currently running Logstash 5.6.7, due to an older version of Elastic Stack being provided by our DBA (we don't expect to have an upgrade until next year).
I've created a logstash plugin in jruby, which calls a jar file in order to get data from a REST API.
I run the plugin as follows:
gem build logstash-filter-example.gemspec &&
../../logstash-5.6.7.freshinstall/bin/logstash-plugin install logstash-filter-example-0.1.1.gem &&
../../logstash-5.6.7.freshinstall/bin/logstash -e 'input { stdin{} } filter { example {} } output {stdout { codec => rubydebug }}'
Upon running, the plugin suddenly fails when the jar file tries to convert a bigint (happens to be a negative number) into a JSON string. Strangely enough, the error is not reproducible when calling the jar from other java programs or jruby programs, only in Logstash.
Error registering plugin {:plugin=>"#<LogStash::FilterDelegator:0x7dd1fccd @metric_events_out=LogStash::Instrument::MetricType::Counter - namespaces: [:stats, :pipelines, :main, :plugins, :filters, :\"52a1b3f6752b2c139814e0d27d8c61b7dc5e3121-2\", :events] key: out value: 0, @metric_events_in=LogStash::Instrument::MetricType::Counter - namespaces: [:stats, :pipelines, :main, :plugins, :filters, :\"52a1b3f6752b2c139814e0d27d8c61b7dc5e3121-2\", :events] key: in value: 0, @logger=#<LogStash::Logging::Logger:0x772997bd @logger=#<Java::OrgApacheLoggingLog4jCore::Logger:0x46efba22>>, @metric_events_time=LogStash::Instrument::MetricType::Counter - namespaces: [:stats, :pipelines, :main, :plugins, :filters, :\"52a1b3f6752b2c139814e0d27d8c61b7dc5e3121-2\", :events] key: duration_in_millis value: 0, @id=\"52a1b3f6752b2c139814e0d27d8c61b7dc5e3121-2\", @klass=LogStash::Filters::Example, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x406eb220 @metric=#<LogStash::Instrument::Metric:0x353610f @collector=#<LogStash::Instrument::Collector:0x38fc9aa7 @agent=nil, @metric_store=#<LogStash::Instrument::MetricStore:0x5204e873 @store=#<Concurrent::Map:0x00000000066f34 entries=2 default_proc=nil>, @structured_lookup_mutex=#<Mutex:0x67cebfa1>, @fast_lookup=#<Concurrent::Map:0x00000000066f38 entries=57 default_proc=nil>>>>, @namespace_name=[:stats, :pipelines, :main, :plugins, :filters, :\"52a1b3f6752b2c139814e0d27d8c61b7dc5e3121-2\", :events]>, @filter=<LogStash::Filters::Example id=>\"52a1b3f6752b2c139814e0d27d8c61b7dc5e3121-2\", enable_metric=>true, periodic_flush=>false>>", :error=>"LogStash::Filters::Example#register must be overidden"}
Pipeline aborted due to error {:exception=>#<RuntimeError: LogStash::Filters::Example#register must be overidden>, :backtrace=>["/Users/michael.dobrin/compilationsFromSource/logstash-5.6.7/logstash-5.6.7.freshinstall/logstash-core/lib/logstash/filters/base.rb:134:in
register'", "/Users/michael.dobrin/compilationsFromSource/logstash-5.6.7/logstash-5.6.7.freshinstall/logstash-core/lib/logstash/pipeline.rb:290:in register_plugin'", "/Users/michael.dobrin/compilationsFromSource/logstash-5.6.7/logstash-5.6.7.freshinstall/logstash-core/lib/logstash/pipeline.rb:301:in
register_plugins'", "org/jruby/RubyArray.java:1613:in each'", "/Users/michael.dobrin/compilationsFromSource/logstash-5.6.7/logstash-5.6.7.freshinstall/logstash-core/lib/logstash/pipeline.rb:301:in
register_plugins'", "/Users/michael.dobrin/compilationsFromSource/logstash-5.6.7/logstash-5.6.7.freshinstall/logstash-core/lib/logstash/pipeline.rb:311:in start_workers'", "/Users/michael.dobrin/compilationsFromSource/logstash-5.6.7/logstash-5.6.7.freshinstall/logstash-core/lib/logstash/pipeline.rb:235:in
run'", "/Users/michael.dobrin/compilationsFromSource/logstash-5.6.7/logstash-5.6.7.freshinstall/logstash-core/lib/logstash/agent.rb:408:in start_pipeline'"]}
Does Logstash have any known compatibility issues related to the case above?