Java - not able to load FFI provider: How to start the logstash without the error?

Tried to load logstash in a Centos environment

[INFO ][logstash.runner ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, --add-opens=java.base/java.security=ALL-UNNAMED, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.nio.channels=ALL-UNNAMED, --add-opens=java.base/sun.nio.ch=ALL-UNNAMED, --add-opens=java.management/sun.management=ALL-UNNAMED]
[2023-04-28T11:16:46,268][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (LoadError) Could not load FFI Provider: (NotImplementedError) FFI not available: null
See http://jira.codehaus.org/browse/JRUBY-4583
org.jruby.exceptions.LoadError: (LoadError) Could not load FFI Provider: (NotImplementedError) FFI not available: null
See http://jira.codehaus.org/browse/JRUBY-4583
at org.jruby.ext.jruby.JRubyUtilLibrary.load_ext(org/jruby/ext/jruby/JRubyUtilLibrary.java:216) ~[jruby.jar:?]
at RUBY.(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/ffi-1.15.5-java/lib/ffi.rb:11) ~[?:?]
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017) ~[jruby.jar:?]
at RUBY.module:LibC(/usr/share/logstash/logstash-core/lib/logstash/util/prctl.rb:19) ~[?:?]
at RUBY.(/usr/share/logstash/logstash-core/lib/logstash/util/prctl.rb:18) ~[?:?]
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017) ~[jruby.jar:?]
at RUBY.set_thread_name(/usr/share/logstash/logstash-core/lib/logstash/util.rb:36) ~[?:?]
at RUBY.execute(/usr/share/logstash/logstash-core/lib/logstash/runner.rb:365) ~[?:?]
at RUBY.run(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/clamp-1.0.1/lib/clamp/command.rb:68) ~[?:?]
at RUBY.run(/usr/share/logstash/logstash-core/lib/logstash/runner.rb:287) ~[?:?]
at RUBY.run(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/clamp-1.0.1/lib/clamp/command.rb:133) ~[?:?]
at usr.share.logstash.lib.bootstrap.environment.(/usr/share/logstash/lib/bootstrap/environment.rb:90) ~[?:?]
Caused by: org.jruby.exceptions.NotImplementedError: (NotImplementedError) FFI not available: null

Unable to start the logstash. Please instruct me step by step to resolve it

My config as follows
input {
beats {
port => 5044
}
}

output {
elasticsearch {
hosts => ["localhost:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
}
}

Might be the temp dir issue. Check this.

I tried changing the directory for temp file in jvm ,

it didn't work

The logstash user must have permissions on that tmp .

Have you tried to run from logstash-8.7.1-linux-x86_64.tar.gz ? Just extract and run for test.

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