Logstash error on new install

I installed logstash 7.13.2 and i'm getting a couple configuration errors that I cannot seem to find the cause.

</>
Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError"
, :message=>"Expected one of [ \t\r\n], "#", "input", "filter", "output" at line 3, column 1 (byte 38) after ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/comp
iler.rb:32:in compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:187:in initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in initialize'", "/usr/shar e/logstash/logstash-core/lib/logstash/java_pipeline.rb:47:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:52:in execute'", "/usr/share/logstash /logstash-core/lib/logstash/agent.rb:389:in block in converge_state'"]}
<>

If I am reading these errors correct there is a missing character at line 3 in the compiler.rb config and/or java_pipeline.rb but I'm not seeing the error. I have included both files below.

</>
#compiler.rb

require 'logstash/compiler/lscl/lscl_grammar'

module LogStash; class Compiler
include ::LogStash::Util::Loggable

def self.compile_imperative(source_with_metadata, support_escapes)
if !source_with_metadata.is_a?(org.logstash.common.SourceWithMetadata)
raise ArgumentError, "Expected 'org.logstash.common.SourceWithMetadata', got #{source_with_metadata.class}"
end

grammar = LogStashCompilerLSCLGrammarParser.new
config = grammar.parse(source_with_metadata.text)

if config.nil?
raise ConfigurationError, grammar.failure_reason
end

config.process_escape_sequences = support_escapes
config.compile(source_with_metadata)
end
end; end
<\>

</>
#java_pipeline.rb

require "thread"
require "concurrent"
require "thwait"
require "logstash/filters/base"
require "logstash/inputs/base"
require "logstash/outputs/base"
require "logstash/instrument/collector"
require "logstash/compiler"
require "logstash/config/lir_serializer"

module LogStash; class JavaPipeline < JavaBasePipeline
include LogStash::Util::Loggable

java_import org.apache.logging.log4j.ThreadContext

attr_reader
:worker_threads,
:input_threads,
:events_consumed,
:events_filtered,
:started_at,
:thread

MAX_INFLIGHT_WARN_THRESHOLD = 10_000
SECOND = 1
MEMORY = "memory".freeze
<>



I am new to logstash so any recommendations or help is greatly appreciated!!

generally this error is in your config file.
post your config file if possible

I feel sheepish in asking this question. Which config file?

where is this error from? is it when you try to start logstash?

This backtrace is telling you that the compiler raised an exception at this line of code

raise ConfigurationError, grammar.failure_reason

The grammar.failure_reason

is telling you that there is a problem at line 3 of your configuration. You will have told logstash where to find this with one of

  • -e to specify a config string on the command line
  • -f to specify a filename on the command line
  • path.config in logstash.yml
  • path.config in pipelines.yml
  • config.string in pipelines.yml

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.