# Filebeat Autodiscover gives fatal error: concurrent map iteration and map write

**URL:** <https://discuss.elastic.co/t/filebeat-autodiscover-gives-fatal-error-concurrent-map-iteration-and-map-write/145296>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 21, 2018, 6:35am UTC](https://discuss.elastic.co/t/filebeat-autodiscover-gives-fatal-error-concurrent-map-iteration-and-map-write/145296 "2018-08-21T06:35:18Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Alsheh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alsheh/32/36799_2.png) [@Alsheh](https://discuss.elastic.co/u/Alsheh)\
**Post date:** [August 23, 2018, 4:56am UTC](https://discuss.elastic.co/t/filebeat-autodiscover-gives-fatal-error-concurrent-map-iteration-and-map-write/145296/9 "2018-08-23T04:56:18Z")

</div>

@pierhugues  
The containerized and uncontainerized filebeats were failing when I included the `add_host_metadata` processor in the configuration. After removing this processor, things seems to be working just fine. Consequently, I need to figure out an alternative way to collect the host meta data with filebeat. Any ideas?

Working filebeat.yml:

```auto
filebeat.autodiscover:
  providers:
    - type: docker
      templates:
        - condition:
            regexp:
              docker.container.image: '.*'
          config:
            - type: docker
              containers:
                path: '/usr/share/filebeat/containers/'
                stream: 'all'
                ids:
                  - '${data.docker.container.id}'
output.logstash:
  hosts: ['logstash:5044', 'logstash2:5044']
  loadbalance: true

```

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-autodiscover-gives-fatal-error-concurrent-map-iteration-and-map-write/145296)._
