# Logstash cannot start due to error

**URL:** <https://forum.opensearch.org/t/logstash-cannot-start-due-to-error/21970>\
**Category:** OpenSearch\
**Tags:** configure\
**Created:** [October 16, 2024, 5:37am UTC](https://forum.opensearch.org/t/logstash-cannot-start-due-to-error/21970 "2024-10-16T05:37:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gray653](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@gray653](https://forum.opensearch.org/u/gray653)\
**Post date:** [October 16, 2024, 5:37am UTC](https://forum.opensearch.org/t/logstash-cannot-start-due-to-error/21970/1 "2024-10-16T05:37:02Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
Opensearch-2.17.1  
Logstash-8.15.2

**Describe the issue** :  
I config Logstash as usual and use the command ./bin/logstash -f /etc/logstash/pipelines.yml to run Logstash, but it shows this error:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/5/59a19a2db2ef3e97430ac41ba509f94a7c3b1393.png)

Although I have installed and ran Logstash twice in the past and I use the same kind of configuration, but this time this error persists. Reading the logs I think the problem is in the pipelines.yml, but I cant figure out how to solve it

**Configuration** :  
-------------------pipelines.yml--------------------

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/b/b8183b31c9d4b7da96b0dff520acb5edaa952bde.png)

-------------------/conf.d/1-input.conf:--------------------

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/5/5d88a5e2fdaa5eef1cb7fc06096c42d8d1d3180c.png)

-------------------/conf.d/2-filter.conf:--------------------

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/5/52521d7b0dca0bacb67eaece159b52a3da474dc2.png)

-------------------/conf.d/3-output.conf:--------------------

```auto
output {
  if [agent][type] == "auditbeat" {
    opensearch {
      hosts => ["https://localhost:9200"]
      index => "auditbeat-%{+YYYY.MM.dd}"
      user => "admin"
      password => "X"
      ssl => true
      ssl_certificate_verification => false
    }
  } else if [service][type] == "apache" {
    opensearch {
      hosts => ["https://localhost:9200"]
      index => "filebeat-%{+YYYY.MM.dd}"
      user => "admin"
      password => "X"
      ssl => true
      ssl_certificate_verification => false
    }
  } else if [agent][type] == "winlogbeat" {
    opensearch {
      hosts => ["https://localhost:9200"]
      index => "winlogbeat-%{+YYYY.MM.dd}"
      user => "admin"
      password => "X"
      ssl => true
      ssl_certificate_verification => false
    }
  } else if [agent][type] == "metricbeat" {
    opensearch {
      hosts => ["https://localhost:9200"]
      index => "metricbeat-%{+YYYY.MM.dd}"
      user => "admin"
      password => "X"
      ssl => true
      ssl_certificate_verification => false
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [October 31, 2024, 11:11pm UTC](https://forum.opensearch.org/t/logstash-cannot-start-due-to-error/21970/2 "2024-10-31T23:11:11Z")

</div>

@gray653 Have you found a solution to your issue?

---

<div class="post-metadata">

**Author:** ![gray653](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@gray653](https://forum.opensearch.org/u/gray653)\
**Post date:** [November 5, 2024, 9:33am UTC](https://forum.opensearch.org/t/logstash-cannot-start-due-to-error/21970/3 "2024-11-05T09:33:57Z")

</div>

I’m still stuck at this, the solution might be reinstalling with different versions. I did it myself and it didn’t work out, but my colleague managed to fix the same problem by reinstalling.

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [November 9, 2024, 12:26am UTC](https://forum.opensearch.org/t/logstash-cannot-start-due-to-error/21970/4 "2024-11-09T00:26:23Z")

</div>

@gray653 I’ve tested your configuration and I had no issues running it. The error is caused by an incorrect command line.  
The `-f` option points to a single or multiple config files (.conf). In your example, you’ve pointed to the pipelines.yml file which caused Logstash to report missing input, filter and output config sections.

Try this instead

```auto
./bin/logstash -f '/etc/logstash/conf.d/{*conf}'

```

Alternatively, you can use piplines.yml by running the below command. Logstash will use pipelines.yml by default to load config files.

```auto
./bin/logstash

```
