logstash-plugins/logstash-filter-fingerprint

(NameError) uninitialized constant LogStash::Filters::Fingerprint::OpenSSL error happens randomly on startup

Closed this issue · 0 comments

Logstash information:

Please include the following information:

  1. Logstash version (e.g. bin/logstash --version)
    7.17.14
  2. Logstash installation source (e.g. built from source, with a package manager: DEB/RPM, expanded from tar or zip archive, docker)
    tar (but should be any)
  3. How is Logstash being run (e.g. as a service/service manager: systemd, upstart, etc. Via command line, docker/kubernetes)
    command line
  4. How was the Logstash Plugin installed
    Default in bundle

JVM (e.g. java -version):

If the affected version of Logstash is 7.9 (or earlier), or if it is NOT using the bundled JDK or using the 'no-jdk' version in 7.10 (or higher), please provide the following information:

  1. JVM version (java -version)
  2. JVM installation source (e.g. from the Operating System's package manager, from source, etc).
  3. Value of the JAVA_HOME environment variable if set.

OS version (uname -a if on a Unix-like system):
Darwin andreas-MBP-2.station 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020 arm64

but happend also on Linux x86_64

Description of the problem including expected versus actual behavior:
Time time starting Logstash with a pipeline that uses fingerprint the following error happens:

[2024-03-06T10:50:30,327][INFO ][logstash.agent           ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2024-03-06T10:50:30,407][ERROR][logstash.javapipeline    ][main] Pipeline worker error, the pipeline will be stopped {
	:pipeline_id=>"main", 
	:error=>"(NameError) uninitialized constant LogStash::Filters::Fingerprint::OpenSSL", 
	:exception=>Java::OrgJrubyExceptions::NameError, 
	:backtrace=>[
        "org.jruby.RubyModule.const_missing(org/jruby/RubyModule.java:3766)", 
        "RUBY.select_digest(/Users/andrea/workspace/elastic_products/logstash-7.17.14/vendor/bundle/jruby/2.5.0/gems/logstash-filter-fingerprint-3.3.2/lib/logstash/filters/fingerprint.rb:224)", 
        "RUBY.fingerprint_openssl(/Users/andrea/workspace/elastic_products/logstash-7.17.14/vendor/bundle/jruby/2.5.0/gems/logstash-filter-fingerprint-3.3.2/lib/logstash/filters/fingerprint.rb:185)", 
        "RUBY.filter(/Users/andrea/workspace/elastic_products/logstash-7.17.14/vendor/bundle/jruby/2.5.0/gems/logstash-filter-fingerprint-3.3.2/lib/logstash/filters/fingerprint.rb:149)", 
        "org.jruby.RubyArray.each(org/jruby/RubyArray.java:1821)", 
        "RUBY.filter(/Users/andrea/workspace/elastic_products/logstash-7.17.14/vendor/bundle/jruby/2.5.0/gems/logstash-filter-fingerprint-3.3.2/lib/logstash/filters/fingerprint.rb:144)", 
        "RUBY.do_filter(/Users/andrea/workspace/elastic_products/logstash-7.17.14/logstash-core/lib/logstash/filters/base.rb:159)", 
        "RUBY.multi_filter(/Users/andrea/workspace/elastic_products/logstash-7.17.14/logstash-core/lib/logstash/filters/base.rb:178)", 
        "org.jruby.RubyArray.each(org/jruby/RubyArray.java:1821)", 
        "RUBY.multi_filter(/Users/andrea/workspace/elastic_products/logstash-7.17.14/logstash-core/lib/logstash/filters/base.rb:175)", 
        "org.logstash.config.ir.compiler.AbstractFilterDelegatorExt.multi_filter(org/logstash/config/ir/compiler/AbstractFilterDelegatorExt.java:134)", 
        "Users.andrea.workspace.elastic_products.logstash_minus_7_dot_17_dot_14.logstash_minus_core.lib.logstash.java_pipeline.start_workers(/Users/andrea/workspace/elastic_products/logstash-7.17.14/logstash-core/lib/logstash/java_pipeline.rb:300)"], 
	:thread=>"#<Thread:0x57ad684c sleep>"}
[2024-03-06T10:50:30,435][WARN ][logstash.javapipeline    ][main] Waiting for input plugin to close {:pipeline_id=>"main", :thread=>"#<Thread:0x57ad684c run>"}
[2024-03-06T10:50:31,558][INFO ][logstash.javapipeline    ][main] Pipeline terminated {"pipeline.id"=>"main"}
[2024-03-06T10:50:31,863][INFO ][logstash.pipelinesregistry] Removed pipeline from registry successfully {:pipeline_id=>:main}
[2024-03-06T10:50:31,882][INFO ][logstash.runner          ] Logstash shut down.

Steps to reproduce:

Please include a minimal but complete recreation of the problem,
including (e.g.) pipeline definition(s), settings, locale, etc. The easier
you make for us to reproduce it, the more likely that somebody will take the
time to look at it.

  1. from fresh 7.17.14Logstash installation
  2. run the following pipeline:
input {
 generator {
 	message => "sample test message"
 	count => 10000000
 }
}

filter {
 fingerprint {
   source => "message"
   target => "fingerprint"
   method => "MD5"
   key    => "epoch-1ki"
 }
}

output {
 #stdout {codec => dots}
 sink {}
}
  1. WARNING the failing on local test happens on 30% of the starts, and happen quite close to the start of the processing

Provide logs (if relevant):