logstash启动报错: stat.st_dev unsupported

自行车丢了 发布于 2016/05/03 18:27
阅读 3K+
收藏 0

NGINX社区官方微服务训练营,深入了解K8s网络,线上课程+专家答疑,立即加入>>>

环境如下:

OS:Red Hat Enterprise Linux Server release 5.8 (Tikanga)

内存:8G

java version "1.8.0_92"

logstash 2.3.2

elasticsearch-2.3.2,已经正常启动

配置文件 logstash.conf
input {
  file { path => "/var/log/messages" start_position => "beginning" }
}
filter {
  grok {
    match => { "message" => "%{COMBINEDAPACHELOG}" }
  }
  date {
    match => [ "timestamp" , "dd/MMM/yyyy:HH🇲🇲ss Z" ]
  }
}
output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "logstash-%{+YYYY.MM.dd}"
  }
  stdout { codec => rubydebug }
}

# bin/logstash -f /etc/logstash/conf.d/logstash.conf
Settings: Default pipeline workers: 4
NotImplementedError: stat.st_dev unsupported or native support failed to load
       dev_major at org/jruby/RubyFileStat.java:205
       nix_inode at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:28
           inode at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:32
           inode at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:106
           watch at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:96
  _discover_file at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:313
            each at org/jruby/RubyArray.java:1613
            each at org/jruby/RubyEnumerator.java:274
  _discover_file at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:304
           watch at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:95
            call at org/jruby/RubyProc.java:281
    synchronized at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:357
     synchronize at org/jruby/ext/thread/Mutex.java:149
    synchronized at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:357
           watch at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/watch.rb:92
            tail at /opt/logstash/vendor/bundle/jruby/1.9/gems/filewatch-0.8.1/lib/filewatch/tail_base.rb:73
            tail at /opt/logstash/vendor/jruby/lib/ruby/1.9/forwardable.rb:201
   begin_tailing at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-file-2.2.5/lib/logstash/inputs/file.rb:288
            each at org/jruby/RubyArray.java:1613
   begin_tailing at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-file-2.2.5/lib/logstash/inputs/file.rb:288
             run at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-file-2.2.5/lib/logstash/inputs/file.rb:292
     inputworker at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:342
     start_input at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:336

我的测试结果:

当我修改logstash.conf 文件时,input这里,写stdin{}时,logstash是可以正常启动的,但写file{}就报“NotImplementedError: stat.st_dev unsupported or native support failed to load”的错误。

请问大牛们,谁遇到了这个问题的并解决了,给个提示,是否是系统环境的问题?十分感谢!


加载中
0
testwork
testwork
检查一下系统内核版本.估计是服务器版本过低,你试试logstash-1.2.2-flatjar.jar, 自己bing一下,千万别百度了.
自行车丢了
自行车丢了
0,嗯百度能搜到的基本就一篇文章,看着挺多,内容一样。
0
自行车丢了
自行车丢了

这个问题已经解决,这个错误出现在RHEL5.8系统上,我更换了RHEL6.3,就一切正常。

感谢楼上“testwork”的回复。

zzuqiang
zzuqiang
通过更换操作系统解决了问题,能否确定是什么原因引起的吗?
0
zzuqiang
zzuqiang

2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

java

java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)


报同样的错误。

0
自行车丢了
自行车丢了
建议使用java 1.8版本
自行车丢了
自行车丢了
@zzuqiang 6.5应该没问题,我在6.3上都没问题。具体问题你还得看什么错了。
zzuqiang
zzuqiang
回复 @LionelShen : 更换了操作系统使用 Distributor ID: CentOS Description: CentOS release 6.6 (Final) Release: 6.6 Codename: Final 解决问题。现在问题是我生产环境操作系统版本都是6.5呀。
自行车丢了
自行车丢了
@zzuqiang OS使用redhat6.3,我的就是这样的环境
zzuqiang
zzuqiang
OpenJDK1.8也试验了 还是不行
自行车丢了
自行车丢了
Redhat6.0以后的版本,毕竟logstash也是近年来新出的东东,5.8版本太旧了,有些依赖和内核支持的都不好。
下一页
0
不用手机注册不行么

这个问题我也遇到了,rh6.6的环境,jdk1.7,同样的错,结果发现是用户权限不够,用root启没问题。

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部