# Start logstash error

**URL:** <https://discuss.elastic.co/t/start-logstash-error/338146>\
**Category:** Logstash\
**Created:** [July 11, 2023, 5:29pm UTC](https://discuss.elastic.co/t/start-logstash-error/338146 "2023-07-11T17:29:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liqiu](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@liqiu](https://discuss.elastic.co/u/liqiu)\
**Post date:** [July 11, 2023, 5:29pm UTC](https://discuss.elastic.co/t/start-logstash-error/338146/1 "2023-07-11T17:29:26Z")

</div>

I have configured the logstash.yml configuration file  
logstash.yml：

```auto
input {stdin{}} output {stdout{}}

```

But when I enter ./logstash to start, the following error occurs

```auto
[2023-07-12T01:16:59,926][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"8.6.0", "jruby.version"=>"jruby 9.3.8.0 (2.6.8) 2022-09-13 98d69c9461 OpenJDK 64-Bit Server VM 17.0.5+8 on 17.0.5+8 +indy +jit [x86_64-linux]"}
[2023-07-12T01:16:59,930][INFO][logstash.runner] JVM bootstrap flags: [-Xms1g, -Xmx1g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, --add-opens=java.base/java.security=ALL-UNNAMED, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.nio.channels=ALL-UNNAMED, --add-opens=java.base/sun.nio.ch=ALL-UNNAMED, --add-opens=java.management/sun.management=ALL-UNNAMED]
Your settings are invalid. Reason: Setting "" doesn't exist. Please check if you haven't made a typo.
[2023-07-12T01:16:59,949][FATAL][org.logstash.Logstash] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:790) ~[jruby.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:753) ~[jruby.jar:?]
        at home.cetc.logstash_minus_8_dot_6_dot_0.lib.bootstrap.environment.<main>(/home/cetc/logstash-8.6.0/lib/bootstrap/environment.rb:91) ~[?:?]

```

I am puzzled. I cleared logstash.yml and used the command ./logstash -e ‘input {stdin{}} output {stdout{}}’, but it started successfully.

```auto
[2023-07-12T01:19:26,074][INFO][logstash.javapipeline][main] Pipeline Java execution initialization time {"seconds"=>0.92}
[2023-07-12T01:19:26,108][INFO][logstash.javapipeline][main] Pipeline started {"pipeline.id"=>"main"}
[2023-07-12T01:19:26,122][INFO][logstash.agent] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
The stdin plugin is now waiting for input:
1
{
       "message" => "1",
    "@timestamp" => 2023-07-11T17:19:31.424360581Z,
         "event" => {
        "original" => "1"
    },
          "host" => {
        "hostname" => "cetc-virtual-machine"
    },
      "@version" => "1"
}

```

---

<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:** [July 11, 2023, 7:01pm UTC](https://discuss.elastic.co/t/start-logstash-error/338146/2 "2023-07-11T19:01:45Z")

</div>

> [@liqiu](#):
>
> logstash.yml：
> 
> ```auto
> input {stdin{}} output {stdout{}}
> 
> ```

The input/filter/output configuration should not be in [logstash.yml](https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html), it should be in a file pointed to by path.config. You can set path.config in logstash.yml, or on the command line using `-f`.

---

<div class="post-metadata">

**Author:** ![PodarcisMuralis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/podarcismuralis/32/122606_2.png) [@PodarcisMuralis](https://discuss.elastic.co/u/PodarcisMuralis)\
**Post date:** [July 11, 2023, 8:05pm UTC](https://discuss.elastic.co/t/start-logstash-error/338146/3 "2023-07-11T20:05:01Z")

</div>

What i do is usually:

Inside my\_logstash\_pipeline.conf:

```auto
input {stdin{}} output {stdout{}}

```

Then i go to etc/logstash (the same level with config) and start it.

```auto
./bin/logstash -f my_logstash_pipeline.conf

```

Make sure that there is no logstash running: sudo systemctl status logstash

You can define multiple pipelines in pipeline.yml file. Then start logstash automatically with: sudo systemctl start logstash

Or sudo systemctl restart logstash  
Or sudo systemctl stop logstash

---

<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:** [August 8, 2023, 8:05pm UTC](https://discuss.elastic.co/t/start-logstash-error/338146/4 "2023-08-08T20:05:28Z")

</div>

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