# Logstash takes wrong pipeline.yml when startin on CLI

**URL:** <https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677>\
**Category:** Logstash\
**Created:** [May 14, 2018, 7:38am UTC](https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677 "2018-05-14T07:38:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcusCaepio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcuscaepio/32/32458_2.png) [@MarcusCaepio](https://discuss.elastic.co/u/MarcusCaepio)\
**Post date:** [May 14, 2018, 7:38am UTC](https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677/1 "2018-05-14T07:38:05Z")

</div>

Hi all,  
I am testing Logstash with mutliple pipelines.  
So I have set my pipelines in /etc/logstash/pipelines.yml.  
When I start logstash in foreground with  
/usr/share/logstash/bin/logstash  
I got the error: ERROR: Failed to read pipelines yaml file. Location: /usr/share/logstash/config/pipelines.yml  
Why does logstash try to take the file in /usr/share/logstash/config and how can I set the path right, to check if my multi pipelines run correct? When I run logstash with -e or -f the pipelines.yml is ignored.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 14, 2018, 8:29am UTC](https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677/2 "2018-05-14T08:29:16Z")

</div>

I suspect [https://www.elastic.co/guide/en/logstash/current/dir-layout.html](https://www.elastic.co/guide/en/logstash/current/dir-layout.html) will answer your questions.

---

<div class="post-metadata">

**Author:** ![MarcusCaepio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcuscaepio/32/32458_2.png) [@MarcusCaepio](https://discuss.elastic.co/u/MarcusCaepio)\
**Post date:** [May 14, 2018, 9:41am UTC](https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677/3 "2018-05-14T09:41:54Z")

</div>

not really because I installed logtsash with packages (ubuntu 18.04) so the default pipeline path should be /etc/logstash/pipelines.yml. When I start logstash as a service, everything works fine. Only when I start /usr/share/logstash/bin/logstash in foreground on CLI it does not work.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 14, 2018, 10:16am UTC](https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677/4 "2018-05-14T10:16:14Z")

</div>

I see. I wonder if the directory defaults for Debian-based Logstash installations only apply when running it as a service. For interactive use you may have to set the settings path via `--path.settings` or the LS\_SETTINGS\_DIR environment variable. See [https://www.elastic.co/guide/en/logstash/current/running-logstash-command-line.html](https://www.elastic.co/guide/en/logstash/current/running-logstash-command-line.html).

---

<div class="post-metadata">

**Author:** ![MarcusCaepio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcuscaepio/32/32458_2.png) [@MarcusCaepio](https://discuss.elastic.co/u/MarcusCaepio)\
**Post date:** [May 14, 2018, 10:37am UTC](https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677/5 "2018-05-14T10:37:38Z")

</div>

I see --path.settings works fine. Thanks Magnus!

---

<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:** [June 11, 2018, 10:47am UTC](https://discuss.elastic.co/t/logstash-takes-wrong-pipeline-yml-when-startin-on-cli/131677/6 "2018-06-11T10:47:07Z")

</div>

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