2

I encountered the following error, which appears to be because of a 'not readable' attribute:

2020-06-23 10:02:55,104 DEBUG -- [pool-1-thread-1] i.p.j.s.io.prometheus.jmx.JmxScraper     : scrape: 'DefaultDomain.ServiceDirectory:type=ServiceLocator,module=Configuration,name=Conf'_'boot.credentials': not readable |TAGS|  |MARKER|
2020-06-23 10:02:55,107 ERROR -- [pool-1-thread-1] i.p.j.s.io.prometheus.jmx.JmxCollector   : JMX scrape failed: java.lang.ClassCastException: java.lang.String cannot be cast to javax.management.Attribute
    at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxScraper.scrapeBean(JmxScraper.java:156)
    at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxScraper.doScrape(JmxScraper.java:117)
    at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:468)
    at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183)
    at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:216)
    at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:137)
    at io.prometheus.jmx.shaded.io.prometheus.client.exporter.common.TextFormat.write004(TextFormat.java:22)
    at io.prometheus.jmx.shaded.io.prometheus.client.exporter.HTTPServer$HTTPMetricHandler.handle(HTTPServer.java:59)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
    at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
    at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
    at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

enter image description here

The problem is that seems like other JMX metrics are affected by this error. This specific JMX with the non-readable value is coming from an external library.

Appreciate any help, thanks.

Sanket Singh
  • 1,246
  • 1
  • 9
  • 26
Ofir Prizat
  • 154
  • 1
  • 15

1 Answers1

0

Adding the following line to the config file prevents the error:

blacklistObjectNames: ["DefaultDomain.ServiceDirectory:*"] 

It does, however, also removes that JMX from being scraped.

Ofir Prizat
  • 154
  • 1
  • 15