[KAFKA-335] jmx metrics introduced in 1.8.0 crush jmx exporter Created: 02/Nov/22  Updated: 28/Oct/23  Resolved: 14/Nov/22

Status: Closed
Project: Kafka Connector
Component/s: None
Affects Version/s: None
Fix Version/s: 1.8.1

Type: Bug Priority: Critical - P2
Reporter: Alon Prantsipal Assignee: Maxim Katcharov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Case:

 Description   

When running 1.8.0 (source connector) with jmx exporter v0.14 the mbeans attributes cannot be scraped by the jmx exporter which results in the exporter failing and not exposing any metrics from the Kafka-Connect host for Prometheus.

Error Messages:
 

Nov 02, 2022 9:21:00 PM io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector collect SEVERE: 
   JMX scrape failed: java.lang.IllegalArgumentException: Not an Attribute: 1 
at java.management/javax.management.AttributeList.adding(AttributeList.java:328) 
at java.management/javax.management.AttributeList.adding(AttributeList.java:335) 
at java.management/javax.management.AttributeList.asList(AttributeList.java:165) 
at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxScraper.scrapeBean(JmxScraper.java:161) 
at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxScraper.doScrape(JmxScraper.java:118) 
at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:547) 
at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:207) 
at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:240) 
at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:161) 
at io.prometheus.jmx.shaded.io.prometheus.client.exporter.common.TextFormat.writeOpenMetrics100(TextFormat.java:202) 
at io.prometheus.jmx.shaded.io.prometheus.client.exporter.common.TextFormat.writeFormat(TextFormat.java:57) 
at io.prometheus.jmx.shaded.io.prometheus.client.exporter.HTTPServer$HTTPMetricHandler.handle(HTTPServer.java:83) 
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77) 
at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:82) 
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80) 
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:730) 
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77) 
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:699) 
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
at java.base/java.lang.Thread.run(Thread.java:829)

 



 Comments   
Comment by Ross Lawley [ 15/Nov/22 ]

Hi alonp@accessfintech.com ,

 
Just to let you know 1.8.1 has been released to maven central.

Please note the documentation is not yet updated but will be in the near future.

Kind Regards,

Ross
 

Comment by Githook User [ 15/Nov/22 ]

Author:

{'name': 'Zeno Grandi', 'email': 'viruzzo@users.noreply.github.com', 'username': 'viruzzo'}

Message: Use type Attribute for attributes in JMX mbeans (#124)

KAFKA-335
Branch: 1.8.x
https://github.com/mongodb/mongo-kafka/commit/d228b99aea4e56d59be0dadc3d63b48df02b7617

Comment by Alon Prantsipal [ 14/Nov/22 ]

Hi - can you please advise in what version the issue is fixed and when it's expected to be released?

Comment by Githook User [ 09/Nov/22 ]

Author:

{'name': 'Zeno Grandi', 'email': 'viruzzo@users.noreply.github.com', 'username': 'viruzzo'}

Message: Use type Attribute for attributes in JMX mbeans (#124)

KAFKA-335
Branch: master
https://github.com/mongodb/mongo-kafka/commit/a2cde07a91c17fccd3cd1b812be17a7ee81352b5

Generated at Thu Feb 08 09:06:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.