logstash启动报错(An unexpected error occurred:Setting hasn‘t been registered)

问题概述

今天需要用logstash收集日志,启动时候一直在报错,开始没用debug一直不知道什么错误,后面发现报错信息包含An unexpected error occurred:Setting hasn't been registered,发现这个问题之前解决过,现在发现忘了怎么解决(所以写博客记录下)

问题分析解决

碰到问题你先执行启动命令加--debug,进行调试,发现什么问题才好解决

bin\logstash -f  config\kafka-logstash-es.conf --debug

其实这个问题已经提示我们setting有问题,回到logstash.yml你看看你的配置 后面是不是加了空格(一定要空格),加上空格这个问题就解决了。例如:queue.type: persisted  #放到磁盘,可以保证数据不丢失 (冒号后面需要一个空格)

 

另外补充一个问题:如果报错信息包含:no implicit conversion from nil to integer,你看看你的文件路径是不是含有中文

An unexpected error occurred! {:error=>#<ArgumentError: Setting "" hasn't been registered>, :backtrace=>["/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:37:in `get_setting'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:70:in `set_value'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:89:in `block in merge'", "org/jruby/RubyHash.java:1343:in `each'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:89:in `merge'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:138:in `validate_all'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/runner.rb:279:in `execute'", "/opt/module/logstash-6.3.2/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/runner.rb:238:in `run'", "/opt/module/logstash-6.3.2/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/opt/module/logstash-6.3.2/lib/bootstrap/environment.rb:73:in `<main>'"]} An unexpected error occurred! {:error=>#<ArgumentError: Setting "" hasn't been registered>, :backtrace=>["/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:37:in `get_setting'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:70:in `set_value'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:89:in `block in merge'", "org/jruby/RubyHash.java:1343:in `each'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:89:in `merge'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/settings.rb:138:in `validate_all'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/runner.rb:279:in `execute'", "/opt/module/logstash-6.3.2/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/opt/module/logstash-6.3.2/logstash-core/lib/logstash/runner.rb:238:in `run'", "/opt/module/logstash-6.3.2/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/opt/module/logstash-6.3.2/lib/bootstrap/environment.rb:73:in `<main>'"]}
最新发布
07-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

木子林_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值