开发者社区> 问答> 正文

logstash启动报错: stat.st_dev unsupported?报错

环境如下:

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”的错误。

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


展开
收起
爱吃鱼的程序员 2020-06-09 14:55:35 837 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    检查一下系统内核版本.估计是服务器版本过低,你试试logstash-1.2.2-flatjar.jar,自己bing一下,千万别百度了.<imgsrc="/js/ke/plugins/emoticons/0.gif"alt="0"/>,嗯百度能搜到的基本就一篇文章,看着挺多,内容一样。

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

    感谢楼上“testwork”的回复。

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

    2.6.32-431.el6.x86_64#1SMPFriNov2203:15:09UTC2013x86_64x86_64x86_64GNU/Linux

    java

    javaversion"1.7.0_79"
    Java(TM)SERuntimeEnvironment(build1.7.0_79-b15)
    JavaHotSpot(TM)64-BitServerVM(build24.79-b02,mixedmode)


    报同样的错误。

    建议使用java1.8版本
    <atarget='_blank'>@zzuqiang6.5应该没问题,我在6.3上都没问题。具体问题你还得看什么错了。回复<aclass='referer'target='_blank'>@LionelShen:更换了操作系统使用DistributorID:CentOSDescription:CentOSrelease6.6(Final)Release:6.6Codename:Final解决问题。现在问题是我生产环境操作系统版本都是6.5呀。<atarget='_blank'>@zzuqiangOS使用redhat6.3,我的就是这样的环境OpenJDK1.8也试验了还是不行Redhat6.0以后的版本,毕竟logstash也是近年来新出的东东,5.8版本太旧了,有些依赖和内核支持的都不好。

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

    2020-06-09 14:55:53
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
MongoShake -- Multi Active-Active and Cross-Region Disaster Recoverable MongoDB Service 立即下载
Using Hadoop to build a Data Quality Service for both real-time and batch data 立即下载
SPARK + FLASHBLADE DELIVERING INSIGHTS FROM 5PB OF PRODUCT LOGS AT PURE STORAGE 立即下载