环境如下:
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”的错误。
请问大牛们,谁遇到了这个问题的并解决了,给个提示,是否是系统环境的问题?十分感谢!
检查一下系统内核版本.估计是服务器版本过低,你试试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)
报同样的错误。
这个问题我也遇到了,rh6.6的环境,jdk1.7,同样的错,结果发现是用户权限不够,用root启没问题。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。