# Filebeat find error Dropping event: no topic could be selected

**URL:** <https://discuss.elastic.co/t/filebeat-find-error-dropping-event-no-topic-could-be-selected/179876>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 7, 2019, 4:09am UTC](https://discuss.elastic.co/t/filebeat-find-error-dropping-event-no-topic-could-be-selected/179876 "2019-05-07T04:09:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![icoolchn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/icoolchn/32/45675_2.png) [@icoolchn](https://discuss.elastic.co/u/icoolchn)\
**Post date:** [May 7, 2019, 4:09am UTC](https://discuss.elastic.co/t/filebeat-find-error-dropping-event-no-topic-could-be-selected/179876/1 "2019-05-07T04:09:46Z")

</div>

filebeat Helm chart deploy ，autodiscover kubernetes log . find ERROR: kafka/client.go:131 Dropping event: no topic could be selected. cause CPU 300% /var/lib/docker/containers/ dir path of filebeat docker log Disk usage has been growing rapidly . Please help to solve the problem ，thanks.

- Version: kubernetes docker image : filebeat-oss:6.5.0 logstash-oss:6.5.0 cp-kafka:4.0.1-1
- Operating System: Centos 7 kubernetes v1.12.5  
Github issue  
[https://github.com/elastic/beats/issues/11988](https://github.com/elastic/beats/issues/11988)

filebeat docker log disk

```
sh-4.2# du -sh *
0 checkpoints
8.0K config.v2.json
1.0G f4a9ff18206508e0427200ef36bbab107cad6df332960ff037709b7476fdf1ce-json.log
4.7G f4a9ff18206508e0427200ef36bbab107cad6df332960ff037709b7476fdf1ce-json.log.1
4.7G f4a9ff18206508e0427200ef36bbab107cad6df332960ff037709b7476fdf1ce-json.log.2
4.7G f4a9ff18206508e0427200ef36bbab107cad6df332960ff037709b7476fdf1ce-json.log.3
4.7G f4a9ff18206508e0427200ef36bbab107cad6df332960ff037709b7476fdf1ce-json.log.4
4.0K hostconfig.json
0 mounts
sh-4.2# pwd
    /var/lib/docker/containers/f4a9ff18206508e0427200ef36bbab107cad6df332960ff037709b7476fdf1ce

    sh-4.2# tail -n 10 f4a9ff18206508e0427200ef36bbab107cad6df332960ff037709b7476fdf1ce-json.log|more
    {"log":"2019-05-07T04:02:47.699Z\u0009ERROR\u0009kafka/client.go:131\u0009Dropping event: no topic could be selected\n","
    stream":"stderr","time":"2019-05-07T04:02:47.699384057Z"}
    {"log":"2019-05-07T04:02:47.699Z\u0009ERROR\u0009kafka/client.go:131\u0009Dropping event: no topic could be selected\n","
    stream":"stderr","time":"2019-05-07T04:02:47.699386084Z"}
    {"log":"2019-05-07T04:02:47.699Z\u0009ERROR\u0009kafka/client.go:131\u0009Dropping event: no topic could be selected\n","
    stream":"stderr","time":"2019-05-07T04:02:47.699409054Z"}
    {"log":"2019-05-07T04:02:47.699Z\u0009ERROR\u0009kafka/client.go:131\u0009Dropping event: no topic could be selected\n","
    stream":"stderr","time":"2019-05-07T04:02:47.6994131Z"}
    {"log":"2019-05-07T04:02:47.699Z\u0009ERROR\u0009kafka/client.go:131\u0009Dropping event: no topic could be selected\n","
    stream":"stderr","time":"2019-05-07T04:02:47.699415269Z"}
    {"log":"2019-05-07T04:02:47.699Z\u0009ERROR\u0009kafka/client.go:131\u0009Dropping event: no topic could be selected\n","
    stream":"stderr","time":"2019-05-07T04:02:47.699418641Z"}

```

filebeat CPU %

```
Tasks: 3 total, 1 running, 2 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.6 us, 4.8 sy, 0.0 ni, 86.5 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 13202631+total, 79643392 free, 18388488 used, 33994436 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 11127580+avail Mem 

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND                                             
    1 root 20 0 3781368 88624 20332 S 332.9 0.1 580:06.64 filebeat

```

filebeat.yml

```
fields:
  kubernetes.cluster.name: testcluster
fields_under_root: true
filebeat.autodiscover:
  providers:
  - hints.enabled: true
    templates:
    - condition.and:
      - not.has_fields:
        - kubernetes.labels.log-index
      - not.equals.kubernetes.container.name: filebeat
      config:
      - containers.ids:
        - ${data.kubernetes.container.id}
        exclude_lines:
        - ^\s+[\-`('.|_]
        fields:
          log_topic: testcluster-${data.kubernetes.namespace}
        type: docker
    type: kubernetes
filebeat.config:
  inputs:
    path: ${path.config}/inputs.d/*.yml
    reload.enabled: false
  modules:
    path: ${path.config}/modules.d/*.yml
    reload.enabled: false
http.enabled: true
http.port: 5066
output.kafka:
  compression: gzip
  hosts:
  - kafka.testclustercom:31090
  - kafka.testcluster.com:31091
  - kafka.testclustercom:31092
  max_message_bytes: 1000000
  partition.round_robin:
    reachable_only: false
  required_acks: 1
  topic: '%{[fields.log_topic]}'
processors:
- add_cloud_metadata: null
```

---

<div class="post-metadata">

**Author:** ![Michal\_Pristas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michal_pristas/32/46639_2.png) [@Michal\_Pristas](https://discuss.elastic.co/u/Michal_Pristas)\
**Post date:** [May 7, 2019, 1:16pm UTC](https://discuss.elastic.co/t/filebeat-find-error-dropping-event-no-topic-could-be-selected/179876/2 "2019-05-07T13:16:20Z")

</div>

there was a reported case [Filebeat Autodiscover Hints Breaking Template](https://discuss.elastic.co/t/filebeat-autodiscover-hints-breaking-template/137310/10)  
when allowing hints started emitting of logs from all the containers even system ones. So I guess if these are emitted and `log_topic` is generated only for the ones matching condition then Kafka topic fallback to empty for others and therefore the error message. This is my guess.

I guess you cannot identify the source of the message. maybe you can play a little with `hints.enabled` to see if it helps

---

<div class="post-metadata">

**Author:** ![icoolchn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/icoolchn/32/45675_2.png) [@icoolchn](https://discuss.elastic.co/u/icoolchn)\
**Post date:** [May 8, 2019, 10:57am UTC](https://discuss.elastic.co/t/filebeat-find-error-dropping-event-no-topic-could-be-selected/179876/3 "2019-05-08T10:57:05Z")

</div>

Hello, @Michal_Pristas Thank you for the help  
closing hints. Enabled: true ，back to normal . [Filebeat Autodiscover Hints Breaking Template](https://discuss.elastic.co/t/filebeat-autodiscover-hints-breaking-template/137310/8) ，This case is didn't use templates . Excuse me， hints. Enabled: true and templates Whether can be used at the same time，thanks.

---

<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 5, 2019, 10:57am UTC](https://discuss.elastic.co/t/filebeat-find-error-dropping-event-no-topic-could-be-selected/179876/4 "2019-06-05T10:57:09Z")

</div>

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