# Error creating runner in Kubernetes autodiscover

**URL:** <https://discuss.elastic.co/t/error-creating-runner-in-kubernetes-autodiscover/183295>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 29, 2019, 10:02am UTC](https://discuss.elastic.co/t/error-creating-runner-in-kubernetes-autodiscover/183295 "2019-05-29T10:02:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cypherfox](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cypherfox/32/47057_2.png) [@cypherfox](https://discuss.elastic.co/u/cypherfox)\
**Post date:** [May 29, 2019, 10:02am UTC](https://discuss.elastic.co/t/error-creating-runner-in-kubernetes-autodiscover/183295/1 "2019-05-29T10:02:35Z")

</div>

Hi there,  
I am trying to gather logs from kubernetes, using filebeat and forwarding to Elasticsearch.

I have configured autoconfigure and added `-d autodiscover` to the arguments to activate more autodiscover logging.

My logs are full of errors similar to this:  
` 2019-05-29T09:36:30.078Z ERROR [autodiscover] cfgfile/list.go:96 Error creating runner from config: Can only start an input when all related states are finished: {Id:31721366-2113 Finished:false Fileinfo:0xc001d43790 Source:/var/lib/docker/containers/5257ad3fe2ba19eb8274db4b6cde68d37284a09dcc398ea3f45602f106b4ce23/5257ad3fe2ba19eb8274db4b6cde68d37284a09dcc398ea3f45602f106b4ce23-json.log Offset:0 Timestamp:2019-05-29 09:35:02.421006566 +0000 UTC m=+94.338924682 TTL:-1ns Type:docker Meta:map[] FileStateOS:31721366-2113}`

I am running filebeat 7.1.1 and the following config:

```
filebeat:
   config:
     modules:
   path: ${path.config}/modules.d/*.yml
   reload.enabled: false
filebeat.autodiscover:
  providers:
    - type: kubernetes
      hints.enabled: true
      include_annotations:
        - co.elastic.logs/disable
        - 'co.elastic.logs/processors.decode_json_fields.fields'
        - 'co.elastic.logs/processors.decode_json_fields.target'
        - 'co.elastic.logs/processors.decode_json_fields.process_array'
        - 'json_logs'
      exclude_labels:
      in_cluster: true
      processors:
        - drop_event:
            when:
              equals:
                kubernetes.container.name: "filebeat"
      appenders:
        - type: config
          config:
            fields:
              sage_note: "I am here 20"
output.elasticsearch:
  hosts: ['log-elasticsearch-client:9200']
output.file:
  enabled: false
http.enabled: true
http.port: 5066

```

I am trying to understand how the logs are consumed, and what causes the error.

I have looked at the following issue, but it is not solved:

> <https://github.com/elastic/beats/issues/11834>
>
> Hi,
> I am using filebeat 6.6.2 version with autodiscover for kubernetes provider… type. After version upgrade from 6.2.4 to 6.6.2, I am facing this error for multiple docker containers.
> 
> \`\`ERROR	\[autodiscover\]	cfgfile/list.go:96	Error creating runner from config: Can only start an input when all related states are finished: {Id:3841919-66305 Finished:false Fileinfo:0xc42070c750 Source:/var/lib/docker/containers/a5330346622f0f10b4d85bac140b4bf69f3ead398a69ac0a66c1e3b742210393/a5330346622f0f10b4d85bac140b4bf69f3ead398a69ac0a66c1e3b742210393-json.log Offset:2860573 Timestamp:2019-04-15 19:28:25.567596091 +0000 UTC m=+557430.342740825 TTL:-1ns Type:docker Meta:map\[\] FileStateOS:3841919-66305}\`\`
> 
> And I see two entries in the registry file
> \`\`{"source":"/var/lib/docker/containers/a1824700c0568c120cd3b939c85ab75df696602f9741a215c74e3ce6b497e111/a1824700c0568c120cd3b939c85ab75df696602f9741a215c74e3ce6b497e111-json.log","offset":8655848,"timestamp":"2019-04-16T10:33:16.507862449Z","ttl":-1,"type":"docker","meta":null,"FileStateOS":{"inode":3841895,"device":66305}}
> {"source":"/var/lib/docker/containers/a1824700c0568c120cd3b939c85ab75df696602f9741a215c74e3ce6b497e111/a1824700c0568c120cd3b939c85ab75df696602f9741a215c74e3ce6b497e111-json.log","offset":3423960,"timestamp":"2019-04-16T10:37:01.366386839Z","ttl":-1,"type":"docker","meta":null,"FileStateOS":{"inode":3841901,"device":66305}}\] \`\`
> 
> Don't see any solutions other than setting the Finished flag to true or updating registry file. Any permanent solutions? Thanks in advance

Two topics here have different errors:

> [@Filebeat (6.4.2) autodiscover on Kubernetes. Missing field accessing 'containers.ids.0'](https://discuss.elastic.co/t/filebeat-6-4-2-autodiscover-on-kubernetes-missing-field-accessing-containers-ids-0/154459):
>
> I got this strange (I've not seen it before) error from Filebeat running as a daemonset on Kubernetes (minikube) today. It might be a misconfiguration, that's why I'm posting here first. Filebeat yaml: filebeat.yml: |- logging.level: info filebeat.autodiscover: providers: - type: kubernetes hints.enabled: true include\_annotations: - "laas.express-rest.no/service" - "laas.express-rest.no/type" - "laas.express-rest.no/token"…

> [@Error creating runner from config: reading docker input config: missing field accessing 'containers.ids.0'](https://discuss.elastic.co/t/error-creating-runner-from-config-reading-docker-input-config-missing-field-accessing-containers-ids-0/158589):
>
> I have the same bug for docker container instead of kubernetes pods [Filebeat (6.4.2) autodiscover on Kubernetes. Missing field accessing 'containers.ids.0'](https://discuss.elastic.co/t/filebeat-6-4-2-autodiscover-on-kubernetes-missing-field-accessing-containers-ids-0/154459) Please include configurations and logs if available. 2018-11-28T14:19:07.054Z INFO log/input.go:138 Configured paths: [/var/lib/docker/containers/2d33e4684aae2a8dc5b504fbdd8337c532f1cec880a45c572fe30a3d17693006/\*.log] 2018-11-28T14:19:07.054Z INFO input/input.go:114 Starting input of type: docker; ID: 17821001299542660013 2018-11-28T14:19:…

Any help appreciated.

mfg lutz

---

<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 26, 2019, 10:02am UTC](https://discuss.elastic.co/t/error-creating-runner-in-kubernetes-autodiscover/183295/2 "2019-06-26T10:02:47Z")

</div>

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