# Logstash error on new install

**URL:** <https://discuss.elastic.co/t/logstash-error-on-new-install/276819>\
**Category:** Logstash\
**Created:** [June 23, 2021, 3:53pm UTC](https://discuss.elastic.co/t/logstash-error-on-new-install/276819 "2021-06-23T15:53:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott2](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@scott2](https://discuss.elastic.co/u/scott2)\
**Post date:** [June 23, 2021, 3:53pm UTC](https://discuss.elastic.co/t/logstash-error-on-new-install/276819/1 "2021-06-23T15:53:59Z")

</div>

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.

```auto
</>
#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  
\<\>

```auto

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

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [June 23, 2021, 4:32pm UTC](https://discuss.elastic.co/t/logstash-error-on-new-install/276819/2 "2021-06-23T16:32:24Z")

</div>

> [@scott2](#):
>
> line 3, column 1 (

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

---

<div class="post-metadata">

**Author:** ![scott2](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@scott2](https://discuss.elastic.co/u/scott2)\
**Post date:** [June 23, 2021, 7:23pm UTC](https://discuss.elastic.co/t/logstash-error-on-new-install/276819/3 "2021-06-23T19:23:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [June 23, 2021, 7:41pm UTC](https://discuss.elastic.co/t/logstash-error-on-new-install/276819/4 "2021-06-23T19:41:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 23, 2021, 7:47pm UTC](https://discuss.elastic.co/t/logstash-error-on-new-install/276819/5 "2021-06-23T19:47:02Z")

</div>

> [@scott2](#):
>
> backtrace=\>["/usr/share/logstash/logstash-core/lib/logstash/comp  
> iler.rb:32:in `compile_imperative'"`

This backtrace is telling you that the compiler raised an exception at [this line of code](https://github.com/elastic/logstash/blob/5a209ba8307e5b77ea18837ee591e1ad64d4ddd2/logstash-core/lib/logstash/compiler.rb#L32)

```
raise ConfigurationError, grammar.failure_reason

```

The grammar.failure\_reason

> [@](#):
>
> "LogStash::ConfigurationError"  
> , :message=\>"Expected one of [\t\r\n], "#", "input", "filter", "output" at line 3, column 1 (byte 38)

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 21, 2021, 7:47pm UTC](https://discuss.elastic.co/t/logstash-error-on-new-install/276819/6 "2021-07-21T19:47:41Z")

</div>

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