jboss with jmx_exporter "Unsupported protocol: remote"

465 views
Skip to first unread message

tomip...@gmail.com

unread,
Feb 27, 2018, 5:07:23 AM2/27/18
to Prometheus Users
Hi,

I have JBOSS 7.0.0 set up in domain mode.

I managed to expose the remote port 4447 + port offset for every jvm I have and I can connect remotely with jconsole using this string "service:jmx:remote://192.168.56.101:4447"(+ the needed credentials of an ApplicationRealm user)

I use jconsole just to test the connection. I did the same thing on a standalone jboss environment and it worked, I would add the same string in the config.yml file of the jmx exporter and it would expose the metrics, however, it doesn't work in the domain mode.

my config.yml file looks like this:

---
startDelaySeconds: 0
#jmxUrl: service:jmx:rmi:///jndi/rmi://192.168.56.101:4447/jmxrmi
jmxUrl: service:jmx:remote://192.168.56.101:4447

username: test
password: test
ssl: false
lowercaseOutputName: false
lowercaseOutputLabelNames: false

whitelistObjectNames: ["*:*"]
rules:
   - pattern: ".*"
####################END OF CONFIG####################

as you can see I tried different connection strings, none of them worked.

The error message I get is:

java -jar jmx_prometheus_httpserver-0.11.jar 5556 config.yml
Feb 27, 2018 10:28:59 AM io.prometheus.jmx.JmxCollector collect
SEVERE: JMX scrape failed: java.net.MalformedURLException: Unsupported protocol: remote
        at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:359)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:269)
        at io.prometheus.jmx.JmxScraper.doScrape(JmxScraper.java:106)
        at io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:415)
        at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:180)
        at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:144)
        at io.prometheus.client.CollectorRegistry.filteredMetricFamilySamples(CollectorRegistry.java:131)
        at io.prometheus.client.exporter.HTTPServer$HTTPMetricHandler.handle(HTTPServer.java:44)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

###########END OF ERROR MESSAGE#############

Any advice would be greatly appreciated!

Kind regards

phil....@gmail.com

unread,
Jun 18, 2018, 8:56:23 AM6/18/18
to Prometheus Users
Hi 

Have you resolve your problem ? I have the same issue with jboss eap 6.5.

Regards
Reply all
Reply to author
Forward
0 new messages