-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JMX scrape failed: java.lang.NullPointerException mx.JmxScraper.scrapeBean(JmxScraper.java:156 #362
Comments
The attributes look to be null, which shouldn't be possible. What are you using this with? |
Hey Brian at config.yml i am using the example got from the site: |
From the debug output, can you tell which mBean is causing this? |
Thanks Brian, i configure the debug output as shown here: |
That's odd, you'd have to debug it yourself. You could also insert some print statements above the line that has the exception to figure out what's going on. |
Thanks Brian, it fails on JmxScraper line 156: so i added before it a null check: then issue resolved. |
We should be resilient to this, but that's also a bug in your application that should be fixed. |
Thanks i will check it but can u also give support for that? |
If you want to put that in a PR and add a log line, that'd be great. |
Hey Brian below is the pull request: |
Hey
i running with jmx_prometheus_javaagent-0.11.0.jar and getting on startup this exception below
can u please advice?
i try also to debug and did not got any logs(https://www.robustperception.io/viewing-logs-for-the-jmx-exporter)
io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector collect
SEVERE: JMX scrape failed: java.lang.NullPointerException
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:460)
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:748)
The text was updated successfully, but these errors were encountered: