Hi - there is a similar topic but the three problems/solutions identified we’re not the same as the one I have encountered.
Logstash-OSS with Opensearch Plugin Failed to Execute Action
I am following the instructions for the Logstash OpenSearch plugin:
Logstash OpenSearch Plugin Instructions
The OpenSearch container is up and running fine.
Then I try to start Logstash by copy/pasting the instructions and I get the same error mentioned in the other post. In this case I was able to narrow it down to the ‘:’ in the hosts config. It does not like that character. I see in the docs that OpenSearch index names can’t have ‘:’, but it should be fine for hosts. Perhaps there is a work around?
I’m running these commands from Windows 11 PowerShell. I have been able to get the Docker OpenSearch and Dashboards all up and running. Now I’m trying to learn Logstash so I can config log file ingestion.
Actual Error:
[2021-12-31T03:11:30,110][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 3, column 21 (byte 66) after output {\n opensearch {\n hosts => [https", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:187:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "/usr/share/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:383:in `block in converge_state'"]}
[2021-12-31T03:11:30,269][INFO ][logstash.runner ] Logstash shut down.
[2021-12-31T03:11:30,286][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-complete-9.2.20.1.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?]
at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]
If I change hosts to the following it stops complaining:
hosts => [“localhost”]
Then it doesn’t like the special chars in the index either, like ‘.’ and ‘%’. So I change that to the following and the whole thing starts up fine:
index => “opensearch”