关于logstash:Expected-\ut\-at-line-1-column-1-byte-1

68次阅读

共计 759 个字符,预计需要花费 2 分钟才能阅读完成。

呈现如下问题阐明是字符编码问题

pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [\\t\\r\\n], \"#\", \"input\", \"filter\", \"output\"at line 1, column 1 (byte 1)", :backtrace=>["/data/logstash-7.9.0/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:183:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:69:in `initialize'", "/data/logstash-7.9.0/logstash-core/lib/logstash/java_pipeline.rb:44:in `initialize'", "/data/logstash-7.9.0/logstash-core/lib/logstash/pipeline_action/create.rb:52:in `execute'", "/data/logstash-7.9.0/logstash-core/lib/logstash/agent.rb:357:in `block in converge_state'"]}

我呈现的状况是在容器里面的 logstash 启动没有问题,然而容器里就有问题,如上图
问题应该说 docker 容器里没有 utf8 的编码,所以 docker 里的文件不要应用中文

正文完
 0