# \[ERROR\]\[logstash.agent \] Failed to execute action

**URL:** <https://discuss.elastic.co/t/error-logstash-agent-failed-to-execute-action/378805>\
**Category:** Logstash\
**Created:** [June 3, 2025, 2:08am UTC](https://discuss.elastic.co/t/error-logstash-agent-failed-to-execute-action/378805 "2025-06-03T02:08:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reyhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reyhan/32/143378_2.png) [@Reyhan](https://discuss.elastic.co/u/Reyhan)\
**Post date:** [June 3, 2025, 2:08am UTC](https://discuss.elastic.co/t/error-logstash-agent-failed-to-execute-action/378805/1 "2025-06-03T02:08:20Z")

</div>

Was working on logstash and got stuck with this error:

\<  
[2025-05-28T06:57:49,669][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of [\t\r\n], "#", "input", "filter", "output" at line 6, column 1 (byte 132) after ", :backtrace=\>["/home/onizuwo/logstash-9.0.1/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:294:in `initialize'", "org/logstash/execution/AbstractPipelineExt.java:227:in `initialize'", "/home/onizuwo/logstash-9.0.1/logstash-core/lib/logstash/java_pipeline.rb:47:in `initialize'", "org/jruby/RubyClass.java:949:in `new'", "/home/onizuwo/logstash-9.0.1/logstash-core/lib/logstash/pipeline_action/create.rb:50:in `execute'", "/home/onizuwo/logstash-9.0.1/logstash-core/lib/logstash/agent.rb:420:in `block in converge\_state'"]}  
/\>

You can also find my script over here:

```auto
input { stdin { } }
filter {}
output {
   elasticsearch {
     hosts => ["https://elasticsearchhost:9200"]
     user => "admin"
     password => "password"
     ssl => true
     ssl_certificate_verification => false
   }
 }

```

I tried to type out the conf file all by myself without copy and paste. I also made sure that the indentation was correct and it still did not work. Can someone advise me on this issue?

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [June 3, 2025, 7:03am UTC](https://discuss.elastic.co/t/error-logstash-agent-failed-to-execute-action/378805/2 "2025-06-03T07:03:33Z")

</div>

Hello @Reyhan ,  
Welcome to the community.  
Could you please check below link :

> [@He given configuration is invalid. Reason: Expected one of #, input, filter, output](https://discuss.elastic.co/t/he-given-configuration-is-invalid-reason-expected-one-of-input-filter-output/202355):
>
> I've got the following syntax error when running Logstash: $ sudo -u logstash /usr/share/logstash/bin/logstash -V logstash 7.1.0 $ sudo -u logstash /usr/share/logstash/bin/logstash -t -f /etc/logstash/logstash.yml WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default c…

To test issue with the configuration maybe we can review it via :  
`bin/logstash --config.test_and_exit -f /path/to/your/config.conf`

Thanks!!

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [June 3, 2025, 8:41am UTC](https://discuss.elastic.co/t/error-logstash-agent-failed-to-execute-action/378805/3 "2025-06-03T08:41:58Z")

</div>

LS v8+ uses `ssl_verification_mode`

```auto
input { stdin { } }
filter {}
output {
   elasticsearch {
     hosts => ["https://elasticsearchhost:9200"]
     user => "admin"
     password => "password"
     ssl_enabled => true
     ssl_verification_mode => none
   }
 }

```

If you are running in the service mode, LS will run all .conf files from ../conf.d/  
As Tortoise said, test your .conf file and run LS from the command line.
