我是靠谱客的博主 土豪日记本,最近开发中收集的这篇文章主要介绍logstash启动成功后立马停止,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

问题1:The following config files contains non-ascii characters but are not UTF-8 encoded

[ERROR][logstash.config.sourceloader] Could not fetch all the sources
{:exception=>LogStash::ConfigLoadingError, :message=>"The following config files contains non-ascii characters
but are not UTF-8 encoded ["d:/ELK/logstash-6.2.2/config/logstash-pg-es.conf"]", :backtrace=>
["D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/config/source/local.rb:85:in `read'", "D:/ELK/logstash-
6.2.2/logstash-core/lib/logstash/config/source/local.rb:96:in `read'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/config/source/local.rb:192:in `local_pipeline_configs'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/config/source/local.rb:163:in `pipeline_configs'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/config/source_loader.rb:59:in `block in fetch'", "org/jruby/RubyArray.java:2481:in
`collect'", "D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/config/source_loader.rb:58:in `fetch'",
"D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:148:in `converge_state_and_update'",
"D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:90:in `execute'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/runner.rb:348:in `block in execute'", "D:/ELK/logstash-
6.2.2/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}

解决:将文件转为UTF-8 编码

问题2:Expected one of #, input, filter, output at line 1, column 1 (byte 1) after

 Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main,
:exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, input, filter, output at line 1,
column 1 (byte 1) after ", :backtrace=>["D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/compiler.rb:42:in
`compile_imperative'", "D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/compiler.rb:50:in `compile_graph'",
"D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/compiler.rb:12:in `block in compile_sources'",
"org/jruby/RubyArray.java:2486:in `map'", "D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/compiler.rb:11:in
`compile_sources'", "D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/pipeline.rb:51:in `initialize'",
"D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/pipeline.rb:169:in `initialize'", "D:/ELK/logstash-
6.2.2/logstash-core/lib/logstash/pipeline_action/create.rb:40:in `execute'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/agent.rb:315:in `block in converge_state'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/agent.rb:141:in `with_pipelines'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/agent.rb:312:in `block in converge_state'", "org/jruby/RubyArray.java:1734:in `each'",
"D:/ELK/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:299:in `converge_state'", "D:/ELK/logstash-
6.2.2/logstash-core/lib/logstash/agent.rb:166:in `block in converge_state_and_update'", "D:/ELK/logstash-
6.2.2/logstash-core/lib/logstash/agent.rb:141:in `with_pipelines'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/agent.rb:164:in `converge_state_and_update'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/agent.rb:90:in `execute'", "D:/ELK/logstash-6.2.2/logstash-
core/lib/logstash/runner.rb:348:in `block in execute'", "D:/ELK/logstash-
6.2.2/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}

解决:
1.删除配置文件中的注释内容
2.查看文件缩进是否有问题
3.将文件转为utf-8无bom编码格式

最后

以上就是土豪日记本为你收集整理的logstash启动成功后立马停止的全部内容,希望文章能够帮你解决logstash启动成功后立马停止所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(48)

评论列表共有 0 条评论

立即
投稿
返回
顶部