Logstash cannot start due to error

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:

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--------------------

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

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

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

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
    }
  }
}

@gray653 Have you found a solution to your issue?

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.

@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

./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.

./bin/logstash