# Pipelines.yml failed to read with Pipeline to Pipeline model

**URL:** <https://discuss.elastic.co/t/pipelines-yml-failed-to-read-with-pipeline-to-pipeline-model/281659>\
**Category:** Logstash\
**Created:** [August 17, 2021, 9:56am UTC](https://discuss.elastic.co/t/pipelines-yml-failed-to-read-with-pipeline-to-pipeline-model/281659 "2021-08-17T09:56:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![panagiss](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@panagiss](https://discuss.elastic.co/u/panagiss)\
**Post date:** [August 17, 2021, 9:56am UTC](https://discuss.elastic.co/t/pipelines-yml-failed-to-read-with-pipeline-to-pipeline-model/281659/1 "2021-08-17T09:56:05Z")

</div>

I had previously multiple pipelines and i added Pipeline to Pipeline model in my **pipelines.yml**  
But since then i get this error:

```auto
ERROR: Failed to read pipelines yaml file. Location: /usr/share/logstash/config/pipelines.yml
usage:
  bin/logstash -f CONFIG_PATH [-t] [-r] [] [-w COUNT] [-l LOG]
  bin/logstash --modules MODULE_NAME [-M "MODULE_NAME.var.PLUGIN_TYPE.PLUGIN_NAME.VARIABLE_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]
  bin/logstash -e CONFIG_STR [-t] [--log.level fatal|error|warn|info|debug|trace] [-w COUNT] [-l LOG]
  bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]
  bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]
  bin/logstash --help

```

So here is my pipeline.yml file:

```auto
- pipeline.id: update-pipeline
  path.config: "/usr/share/logstash/pipeline/update.conf"
  pipeline.workers: 1

- pipeline.id: enrichment-pipeline
  path.config: "/usr/share/logstash/pipeline/enrichment.conf"

- pipeline.id: skoupa
  config.string: |
    input { beats { port => 5044 } }
    output { pipeline { send_to => ["to-es", "enrich"] } }

- pipeline.id: straight-es
  config.string: |
    input { pipeline { address => "to-es" } }
    output { elasticsearch { hosts => ["https://localhost:9200"] 
        index => "%{[@metadata][beat]}-%{[@metadata][version]}"
        user => logstash_internal
        password => apass
        ssl => true
        cacert => "/usr/share/logstash/config/elasticsearch-ca.pem"
        http_compression => true
	 	    sniffing => false } }

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 17, 2021, 2:26pm UTC](https://discuss.elastic.co/t/pipelines-yml-failed-to-read-with-pipeline-to-pipeline-model/281659/2 "2021-08-17T14:26:55Z")

</div>

> [@panagiss](#):
>
> `Failed to read pipelines yaml file. Location: /usr/share/logstash/config/pipelines.yml`

It is failing to read the file. That has nothing to do with the contents of the file, since logstash has not seen the contents. The most likely explanations are that the file does not exist or the user running logstash does not have permissions to access the file or one of the directories in the path.

---

<div class="post-metadata">

**Author:** ![panagiss](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@panagiss](https://discuss.elastic.co/u/panagiss)\
**Post date:** [August 17, 2021, 2:32pm UTC](https://discuss.elastic.co/t/pipelines-yml-failed-to-read-with-pipeline-to-pipeline-model/281659/3 "2021-08-17T14:32:44Z")

</div>

Commented the config and added it to separate files and now it is working. It has nothing to do with permissions or wrong path

```auto
- pipeline.id: misp-update-pipeline
  path.config: "/usr/share/logstash/pipeline/misp.conf"
  pipeline.workers: 1

- pipeline.id: misp-enrichment-pipeline
  path.config: "/usr/share/logstash/pipeline/enrichment.conf"

- pipeline.id: skoupa
  path.config: "/usr/share/logstash/pipeline/skoupa.conf"

  # config.string: |
  # input { beats { port => 5044 } }
  # output { pipeline { send_to => ["to-es", "enrich"] } }

- pipeline.id: straight-es
  path.config: "/usr/share/logstash/pipeline/straight_es.conf"
  
  # config.string: |
  # input { pipeline { address => "to-es" } }
  # output { elasticsearch { hosts => ["https://localhost:9200"] 
  # index => "%{[@metadata][beat]}-%{[@metadata][version]}"
  # user => logstash_internal
  # password => logstashpass
  # ssl => true
  # cacert => "/usr/share/logstash/config/elasticsearch-ca.pem"
  # http_compression => true
  # sniffing => false } }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 14, 2021, 2:32pm UTC](https://discuss.elastic.co/t/pipelines-yml-failed-to-read-with-pipeline-to-pipeline-model/281659/4 "2021-09-14T14:32:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
