# Yaml: line 159: did not find expected key

**URL:** <https://discuss.elastic.co/t/yaml-line-159-did-not-find-expected-key/211516>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 11, 2019, 7:24pm UTC](https://discuss.elastic.co/t/yaml-line-159-did-not-find-expected-key/211516 "2019-12-11T19:24:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![uek1967](https://avatars.discourse-cdn.com/v4/letter/u/7feea3/32.png) [@uek1967](https://discuss.elastic.co/u/uek1967)\
**Post date:** [December 11, 2019, 7:24pm UTC](https://discuss.elastic.co/t/yaml-line-159-did-not-find-expected-key/211516/1 "2019-12-11T19:24:46Z")

</div>

Hi folks,  
I need you help solving the problem with filebeat as described above:

` ./filebeat test config -e` gives out the following error:  
`Exiting: error loading config file: yaml: line 159: did not find expected key`

What key is meant and where is it to find?  
Here is the filebeat.yml file:

[https://pastebin.com/cVjhHn7T](https://pastebin.com/cVjhHn7T)

Many thanks in advance,

Uli

---

<div class="post-metadata">

**Author:** ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)\
**Post date:** [December 12, 2019, 10:31am UTC](https://discuss.elastic.co/t/yaml-line-159-did-not-find-expected-key/211516/2 "2019-12-12T10:31:15Z")

</div>

Hi!

The problem is the `true`. Please remove it.

```auto
output.logstash:
  # The Logstash hosts
  hosts: ["127.0.0.1:5044"]

```

---

<div class="post-metadata">

**Author:** ![uek19671](https://avatars.discourse-cdn.com/v4/letter/u/edb3f5/32.png) [@uek19671](https://discuss.elastic.co/u/uek19671)\
**Post date:** [December 12, 2019, 10:57am UTC](https://discuss.elastic.co/t/yaml-line-159-did-not-find-expected-key/211516/3 "2019-12-12T10:57:05Z")

</div>

Hi Chris,  
Thanks but I didn't help. Same Error as before.

Regards ,

Uli

> [@uek1967](#):
>
> `./filebeat test config -e`

---

<div class="post-metadata">

**Author:** ![uek19671](https://avatars.discourse-cdn.com/v4/letter/u/edb3f5/32.png) [@uek19671](https://discuss.elastic.co/u/uek19671)\
**Post date:** [December 12, 2019, 11:32am UTC](https://discuss.elastic.co/t/yaml-line-159-did-not-find-expected-key/211516/4 "2019-12-12T11:32:24Z")

</div>

Problem solved there was q second filebeat.yml file.

Regards,

Uli

---

<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:** [January 9, 2020, 11:32am UTC](https://discuss.elastic.co/t/yaml-line-159-did-not-find-expected-key/211516/5 "2020-01-09T11:32:25Z")

</div>

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