Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Native library support error on m1 equipped macbooks using native java #306

Closed
Tracked by #13426
robbavey opened this issue Nov 19, 2021 · 1 comment
Closed
Tracked by #13426
Labels

Comments

@robbavey
Copy link
Contributor

Logstash information:

Latest checkout of logstash from m1_artifacts branch (recent fork of master), using aarch64 native JDK as bundled JDK on an m1 equipped mac mini

JVM (e.g. java -version):

logstash % java -version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)
OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode)

When attempting to run a minimal pipeline with a file input,

bin/logstash -e 'input { file { path => "/Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/test.txt" } } '

The following errors occur

When attempting to read a file:

warning: thread "[main]<file" terminated with exception (report_on_exception is true):
NotImplementedError: stat.st_dev unsupported or native support failed to load; see https://github.com/jruby/jruby/wiki/Native-Libraries
                dev_major at org/jruby/RubyFileStat.java:246
                   restat at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/stat/generic.rb:18
               initialize at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/stat/generic.rb:10
       discover_any_files at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:68
                     each at org/jruby/RubyArray.java:1821
       discover_any_files at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:62
  discover_files_new_path at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:52
                 add_path at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:26
                    watch at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/watch.rb:26
               watch_this at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/observing_base.rb:69
         start_processing at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:364
                     each at org/jruby/RubyArray.java:1821
         start_processing at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:364
                      run at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:368
              inputworker at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:409
              start_input at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:400
warning: thread "Ruby-0-Thread-26: :1" terminated with exception (report_on_exception is true):
NotImplementedError: stat.st_dev unsupported or native support failed to load; see https://github.com/jruby/jruby/wiki/Native-Libraries
                dev_major at org/jruby/RubyFileStat.java:246
                   restat at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/stat/generic.rb:18
               initialize at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/stat/generic.rb:10
       discover_any_files at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:68
                     each at org/jruby/RubyArray.java:1821
       discover_any_files at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:62
  discover_files_new_path at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:52
                 add_path at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/discoverer.rb:26
                    watch at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/watch.rb:26
               watch_this at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/observing_base.rb:69
         start_processing at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:364
                     each at org/jruby/RubyArray.java:1821
         start_processing at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:364
                      run at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:368
              inputworker at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:409
              start_input at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:400

when setting up sincedb:

[2021-11-19T16:59:27,123][INFO ][filewatch.observingtail  ][main][05bfb2743507c3c3c0a7760dafe412810accafd530a9617c003577305b9af0f1] START, creating Discoverer, Watch with file and sincedb collections
warning: thread "[main]<file" terminated with exception (report_on_exception is true):
NotImplementedError: block device detection unsupported or native support failed to load; see https://github.com/jruby/jruby/wiki/Native-Libraries
                     blockdev? at org/jruby/RubyFileTest.java:66
                    initialize at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/sincedb_collection.rb:20
  build_watch_and_dependencies at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/observing_base.rb:62
                    initialize at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/observing_base.rb:56
              start_processing at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:352
                           run at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:368
                   inputworker at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:409
                   start_input at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:400
warning: thread "Ruby-0-Thread-26: :1" terminated with exception (report_on_exception is true):
NotImplementedError: block device detection unsupported or native support failed to load; see https://github.com/jruby/jruby/wiki/Native-Libraries
                     blockdev? at org/jruby/RubyFileTest.java:66
                    initialize at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/sincedb_collection.rb:20
  build_watch_and_dependencies at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/observing_base.rb:62
                    initialize at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/observing_base.rb:56
              start_processing at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:352
                           run at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/logstash/inputs/file.rb:368
                   inputworker at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:409
                   start_input at /Users/robbavey/artifacts/logstash-8.1.0-SNAPSHOT/logstash-core/lib/logstash/java_pipeline.rb:400

Initial thoughts are that these likely a similar issue to that encountered when we first started using this plugin on aarch64 linux boxes

Relates: #281

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants