# Error fetching data for metricset kafka.partition

**URL:** <https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 21, 2020, 6:01am UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946 "2020-06-21T06:01:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eyesmoker](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@eyesmoker](https://discuss.elastic.co/u/eyesmoker)\
**Post date:** [June 21, 2020, 6:01am UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946/1 "2020-06-21T06:01:52Z")

</div>

Hi,  
I am running kafka and elk on kubernetes. I am trying to send kafka metrics to elk to view Metricbeat Kafka dashboard. Metricbeat is running as daemonset.

Here is my metricbeat config:

- module: kafka  
enabled: true  
metricsets:  
- partition  
- consumergroup  
period: 10s  
hosts: ["my-connect-cp-kafka.default.svc.cluster.local:9092"]

Errors I get:  
2020-06-21T05:58:49.267Z INFO module/wrapper.go:259 Error fetching data for metricset kafka.partition: error in connect: No advertised broker with address my-connect-cp-kafka.default.svc.cluster.local:9092 found

There are 3 kafka pods. I have tried with localhost:9092, PLAINTEXT://headless service name:9092

Please advice.

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [June 24, 2020, 6:02am UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946/2 "2020-06-24T06:02:48Z")

</div>

My first question is to verify twice if the address is accessible from inside the pod.

---

<div class="post-metadata">

**Author:** ![eyesmoker](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@eyesmoker](https://discuss.elastic.co/u/eyesmoker)\
**Post date:** [June 24, 2020, 11:38pm UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946/3 "2020-06-24T23:38:59Z")

</div>

Thanks for responding. I am inside metricsbeat pod able to verify connection to kafka .

[root@metricbeat-metricbeat-9cfrl metricbeat]# telnet my-connect-cp-kafka.default.svc.cluster.local 9092  
Trying 10.100.249.247...  
Connected to my-connect-cp-kafka.default.svc.cluster.local.  
Escape character is '^]'.  
[root@metricbeat-metricbeat-9cfrl metricbeat]# telnet kube-state-metrics.kube-system.svc.cluster.local 8080  
Trying 10.100.31.164...  
Connected to kube-state-metrics.kube-system.svc.cluster.local.  
Escape character is '^]'.

---

<div class="post-metadata">

**Author:** ![eyesmoker](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@eyesmoker](https://discuss.elastic.co/u/eyesmoker)\
**Post date:** [June 25, 2020, 10:05pm UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946/4 "2020-06-25T22:05:07Z")

</div>

I took all steps mentioned in [https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kafka.html](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kafka.html) . Looks like there was a problem with kafka connection. I fixed that this morning but I don’t see any metrics on Metricbeat Kafka dashboard or any errors from the metric beat pod logs. I am also wondering how to debug these issues.

I have tried with Kafka 2.2.2 and also latest kafka version. I have applied kafka-acls that was mentioned in the document.

---

<div class="post-metadata">

**Author:** ![eyesmoker](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@eyesmoker](https://discuss.elastic.co/u/eyesmoker)\
**Post date:** [June 25, 2020, 11:12pm UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946/5 "2020-06-25T23:12:56Z")

</div>

When I turned on debug(logging.level: debug):  
"message": "error in connect: No advertised broker with address my-connect-cp-kafka.default.svc.cluster.local:9092 found"

I am able to create topics etc on the kafka cluster. So, kafka pods are healthy.

---

<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:** [July 24, 2020, 1:13am UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-kafka-partition/237946/6 "2020-07-24T01:13:06Z")

</div>

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