I recently tried to use Elasticsearch and IK in combination with Logstash to link mysql, and tested Logstash with the following error message.
First enter the command: logstash -e ‘input {stdin{}} output {stdout{}}’
D:\myworkspace\es\logstash-6.4.3\bin>logstash -e 'input {stdin{}} output {stdout{}}'
The command is correct, but the result is:
D:\myworkspace\es\logstash-6.4.3\bin>logstash -e 'input {stdin{}} output {stdout{}}'
ERROR: Unknown command '{stdin{}}'
See: 'bin/logstash --help'
[ERROR] 2022-08-23 09:06:42.875 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
Solution:
You should try the following command first:
logstash -e “”
The result was successful:
D:\myworkspace\es\logstash-6.4.3\bin>logstash -e ""
Sending Logstash logs to D:/myworkspace/es/logstash-6.4.3/logs which is now configured via log4j2.properties
[2022-08-23T09:16:16,950][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.queue", :path=>"D:/myworkspace/es/logstash-6.4.3/data/queue"}
[2022-08-23T09:16:16,958][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.dead_letter_queue", :path=>"D:/myworkspace/es/logstash-6.4.3/data/dead_letter_queue"}
[2022-08-23T09:16:17,054][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2022-08-23T09:16:17,164][INFO ][logstash.agent ] No persistent UUID file found. Generating new UUID {:uuid=>"0777ac0f-9efb-463d-8e2c-874bc1dc9feb", :path=>"D:/myworkspace/es/logstash-6.4.3/data/uuid"}
[2022-08-23T09:16:17,592][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.4.3"}
[2022-08-23T09:16:20,129][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2022-08-23T09:16:20,231][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x5fba80a0 run>"}
The stdin plugin is now waiting for input:
[2022-08-23T09:16:20,277][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2022-08-23T09:16:20,611][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2022-08-23T09:16:43,203][WARN ][logstash.runner ] SIGINT received. Shutting down.
[2022-08-23T09:16:43,338][INFO ][logstash.pipeline ] Pipeline has terminated {:pipeline_id=>"main", :thread=>"#<Thread:0x5fba80a0 run>"}
[2022-08-23T09:16:43,340][FATAL][logstash.runner ] SIGINT received. Terminating immediately.
Decisively replace with the following command:
logstash -e "input { stdin {} } output {stdout {} }"
Done!
D:\myworkspace\es\logstash-6.4.3\bin>logstash -e "input { stdin {} } output {stdout {} }"
Sending Logstash logs to D:/myworkspace/es/logstash-6.4.3/logs which is now configured via log4j2.properties
[2022-08-23T09:17:48,125][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2022-08-23T09:17:48,690][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.4.3"}
[2022-08-23T09:17:50,871][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2022-08-23T09:17:50,964][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x268e4bb5 run>"}
The stdin plugin is now waiting for input:
[2022-08-23T09:17:51,008][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2022-08-23T09:17:51,209][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
Read More:
- Caused by: java.lang.IllegalStateException (How to Fix)
- [Solved] Java.lang.IllegalStateException: getReader() has already been called for this request
- [Solved] Internal error (java.lang.IllegalStateException): Duplicate key org.jetbrains
- JUnit test classes error: java.lang.IllegalStateException: Failed to load ApplicationContext
- [Solved] java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
- [Solved] stream Convert list to map Error: java.lang.IllegalStateException: Duplicate key
- [Solved] Java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__frch_it
- Request processing failed; nested exception is java.lang.NullPointerException or UnsatisfiedDependencyE
- [Solved] Hibernate Error: java.lang.StackOverflowError at java.lang.Integer.toString(Integer.java:402)
- [Solved] Java.lang.ClassCastException: [Ljava.lang.Long; cannot be cast to java.util.List
- JAVA Error Illegal access: this web application instance has been stopped already. Could not load net.sf
- keytool error: java.lang.Exception: Input not an X.509 certificate
- [Solved] nacos Startup Error: nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error
- Java uses class array to report error Exception in thread “main” java.lang.NullPointerException solution
- [Solved] java: Internal error in the mapping processor: java.lang.NullPointerException
- [Solved] IDEA springboot Startup Error: java.lang.UnsatisfiedLinkError: no tcnative-1 in java.library.path
- [Solved] java Internal error in the mapping processor java.lang.NullPointerException
- [Solved] java Internal error in the mapping processor java.lang.NullPointerException
- Asynchronous processing of HTTP request by Java_ Method 2: through deferredresult
- [Solved] Java 9 reflection error: java.lang.reflect.InaccessibleObjectException