直接运行
bin/logstash -e 'input{stdin{}}output{stdout{codec=>rubydebug}}'
成功,输入后有输出。
但是输出到 elasticsearch 就报错了
bin/logstash -f logstash.config
一段时间没有响应,并在报错后结束进程。
报错如下:
An unexpected error occurred! {:error=>#<ArgumentError: Setting "" hasn't been registered>, :backtrace=>["/data/logstash/logstash-5.2.2/logstash-core/lib/logstash/settings.rb:29:in get_setting'", "/data/logstash/logstash-5.2.2/logstash-core/lib/logstash/settings.rb:61:in
set_value'", "/data/logstash/logstash-5.2.2/logstash-core/lib/logstash/settings.rb:80:in merge'", "org/jruby/RubyHash.java:1342:in
each'", "/data/logstash/logstash-5.2.2/logstash-core/lib/logstash/settings.rb:80:in merge'", "/data/logstash/logstash-5.2.2/logstash-core/lib/logstash/settings.rb:115:in
validate_all'", "/data/logstash/logstash-5.2.2/logstash-core/lib/logstash/runner.rb:210:in execute'", "/data/logstash/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in
run'", "/data/logstash/logstash-5.2.2/logstash-core/lib/logstash/runner.rb:183:in run'", "/data/logstash/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in
run'", "/data/logstash/logstash-5.2.2/lib/bootstrap/environment.rb:71:in `(root)'"]}
logstash.config 配置内容如下:
input{
stdin { }
}
output{
elasticsearch {
host => "127.0.0.1:7101"
index => "logstash_test"
flush_size => 2000
idle_flush_time => 5
}
}
查过 elasticsearch,并没有数据进来。而且输入的数据明显没有发送出去,在报错后,才在命令行被获取
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.