File Input fails on FreeBSD 10.0 with NotImplementedError: stat.st_dev unsupported or native support failed to load


After updating a couple of FreeBSD 9.2 boxes to FreeBSD 10.0 (amd64), Logstash stopped working with the specified error. The issue is very similar, if not identical, to, apart from the affected OS. The existence of this issue has been verified on a fresh install of FreeBSD 10.0 as well.

Update 1:

It seems that the problem is caused by a bug in the jnr-ffi component, a JRuby dependency, that in turn is a Logstash dependency. I've sent a pull request ( you can refer to (and comment if you feel like to) in case you want to speed things up and have it merged upstream.

Update 2:

Since upstream (jnr-ffi) remains silent on this problem, I've forked that project, fixed it for FreeBSD and I will try to track upstream:

At the moment, it can be used as a drop-in replacement for jnr-ffi. In fact, to solve Logstash problems on FreeBSD, I've just updated the Logstash port ( so that it patches the JRuby JAR shipped with Logstash and substitute the original {{jnr-ffi}} classes with the ones from the fork. I guess other *BSDs' and other OS' users may benefit from the same temporary solution as well.

However, the best solution would be upstream {{jnr-ffi}} to solve this issue: if you hit this problem and even if the above workaround solves it, please vote the PR in the {{jnr-ffi}} repository:


Markus Langer
February 4, 2014, 8:50 AM

Same issue here:
Using milestone 2 input plugin 'file'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see {:level=>:warn}
Using milestone 1 filter plugin 'syslog_pri'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin. For more information on plugin milestones, see {:level=>:warn}
Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NotImplementedError) stat.st_dev unsupported or native support failed to load
at org.jruby.RubyFileStat.dev_major(org/jruby/
at RUBY._discover_file(file:/usr/local/logstash/logstash-1.3.3-flatjar.jar!/filewatch/watch.rb:140)
at org.jruby.RubyArray.each(org/jruby/
at RUBY._discover_file(file:/usr/local/logstash/logstash-1.3.3-flatjar.jar!/filewatch/watch.rb:122)
at RUBY.tail(file:/usr/local/logstash/logstash-1.3.3-flatjar.jar!/filewatch/tail.rb:58)
at org.jruby.RubyArray.each(org/jruby/
at RUBY.inputworker(file:/usr/local/logstash/logstash-1.3.3-flatjar.jar!/logstash/pipeline.rb:156)
at RUBY.start_input(file:/usr/local/logstash/logstash-1.3.3-flatjar.jar!/logstash/pipeline.rb:150)

Emile `iMil' Heitor
April 12, 2014, 1:26 PM

This bug also hits NetBSD 6.1/amd64, with logstash 1.4.0. Exact same stacktrace. Using OpenJDK 1.7.

Enrico Maria Crisostomo
January 28, 2015, 8:23 AM

The JRuby patch that fixes this has finally been merged into upstream ( Looking forward to a Logstash update including the fixed JRuby jars.

Jordan Sissel
January 28, 2015, 4:39 PM

that patch only landed 2 days ago. There is no new JRuby release which includes this at this time. Logstash will get the fix when it includes a JRuby release that includes that patch.

Enrico Maria Crisostomo
February 16, 2015, 1:04 PM

Thanks Jordan: the goal of my comment was just bringing this issue up to date with all the relevant information so that both users hitting this problem and maintainers are aware of what's in their hand to fix it. Thanks.


Logstash Developers


Enrico Maria Crisostomo

Affects versions