I have configured the logstash.yml configuration file
logstash.yml:
input {stdin{}} output {stdout{}}
But when I enter ./logstash to start, the following error occurs
[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.
[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"
}