Logstash 8.2.2 on Windows 10 failed to start

Hello,

Logstash 8.2.2 for windows failed to run, i have the following output.
Could someone please help

Regards

C:\WINDOWS\system32>logstash -f logstash.conf
"Using bundled JDK: D:\Technical-Docs\Audits\Audit-Security\Tools-2022\Elastic\logstash-8.2.2\jdk\bin\java.exe"
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Sending Logstash logs to D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logs which is now configured via log4j2.properties
[2022-06-14T09:23:15,219][INFO ][logstash.runner ] Log4j configuration path used is: D:\Technical-Docs\Audits\Audit-Security\Tools-2022\Elastic\logstash-8.2.2\config\log4j2.properties
[2022-06-14T09:23:15,227][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"8.2.2", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.14.1+1 on 11.0.14.1+1 +indy +jit [mswin32-x86_64]"}
[2022-06-14T09:23:15,228][INFO ][logstash.runner ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --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]
[2022-06-14T09:23:15,308][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2022-06-14T09:23:16,967][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[2022-06-14T09:23:17,233][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [A-Za-z0-9_-], [ \t\r\n], "#", "{", [A-Za-z0-9_], ",", "]" at line 7, column 23 (byte 76) after output {\r\n Elasticsearch {\r\n hosts => [localhost", :backtrace=>["D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/compiler.rb:32:in compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:189:in initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in initialize'", "D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/java_pipeline.rb:48:in initialize'", "D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/pipeline_action/create.rb:50:in execute'", "D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/agent.rb:381:in block in converge_state'"]}
[2022-06-14T09:23:17,305][INFO ][logstash.runner ] Logstash shut down.
[2022-06-14T09:23:17,314][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:747) ~[jruby.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby.jar:?]
at D_3a_.Technical_minus_Docs.Audits.Audit_minus_Security.Tools_minus_2022.Elastic.logstash_minus_8_dot_2_dot_2.lib.bootstrap.environment.(D:\Technical-Docs\Audits\Audit-Security\Tools-2022\Elastic\logstash-8.2.2\lib\bootstrap\environment.rb:91) ~[?:?]
C:\WINDOWS\system32>logstash -f logstash.conf
"Using bundled JDK: D:\Technical-Docs\Audits\Audit-Security\Tools-2022\Elastic\logstash-8.2.2\jdk\bin\java.exe"
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Sending Logstash logs to D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logs which is now configured via log4j2.properties
[2022-06-14T09:23:15,219][INFO ][logstash.runner ] Log4j configuration path used is: D:\Technical-Docs\Audits\Audit-Security\Tools-2022\Elastic\logstash-8.2.2\config\log4j2.properties
[2022-06-14T09:23:15,227][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"8.2.2", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.14.1+1 on 11.0.14.1+1 +indy +jit [mswin32-x86_64]"}
[2022-06-14T09:23:15,228][INFO ][logstash.runner ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --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]
[2022-06-14T09:23:15,308][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2022-06-14T09:23:16,967][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[2022-06-14T09:23:17,233][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [A-Za-z0-9_-], [ \t\r\n], "#", "{", [A-Za-z0-9_], ",", "]" at line 7, column 23 (byte 76) after output {\r\n Elasticsearch {\r\n hosts => [localhost", :backtrace=>["D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/compiler.rb:32:in compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:189:in initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in initialize'", "D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/java_pipeline.rb:48:in initialize'", "D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/pipeline_action/create.rb:50:in execute'", "D:/Technical-Docs/Audits/Audit-Security/Tools-2022/Elastic/logstash-8.2.2/logstash-core/lib/logstash/agent.rb:381:in block in converge_state'"]}
[2022-06-14T09:23:17,305][INFO ][logstash.runner ] Logstash shut down.
[2022-06-14T09:23:17,314][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:747) ~[jruby.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby.jar:?]
at D_3a_.Technical_minus_Docs.Audits.Audit_minus_Security.Tools_minus_2022.Elastic.logstash_minus_8_dot_2_dot_2.lib.bootstrap.environment.(D:\Technical-Docs\Audits\Audit-Security\Tools-2022\Elastic\logstash-8.2.2\lib\bootstrap\environment.rb:91) ~[?:?]

This is duplicate issue.

Original issue can be found in Logstash 8.2.2 on windows 10