[keycloak-user] Infinispan MBean Null Pointer Exception
Matteo Restelli
mrestelli at cuebiq.com
Thu May 2 08:52:04 EDT 2019
Hi all,
We're encountering a NullPointerException during our scraping of JMX
Metrics in Keycloak. More precisely:
- We're exporting the jmx via Prometheus Exporter Agent (javaagent)
- Our additional run params are the following:
"-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager
-Xbootclasspath/p:/opt/jboss/keycloak/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.7.Final.jar
-Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.4.0.Final.jar
-javaagent:/opt/jboss/keycloak/jmx_prometheus_javaagent.jar=18080:/home/config.yaml"
- Everytime Prometheus scrapes on the 18080 port, we encounter a lot of
Null pointer exceptions related to LockingMetric.java. See the following
error:
12:42:08,318 ERROR [org.jboss.as.controller.management-operation]
(pool-1-thread-3) WFLYCTL0013: Operation ("read-attribute") failed -
address: ([
keycloak_1 | ("subsystem" => "infinispan"),
keycloak_1 | ("cache-container" => "keycloak"),
keycloak_1 | ("local-cache" => "users"),
keycloak_1 | ("component" => "locking")
keycloak_1 | ]): java.lang.NullPointerException
keycloak_1 | at
org.jboss.as.clustering.infinispan.subsystem.LockingMetric$1.execute(LockingMetric.java:41)
keycloak_1 | at
org.jboss.as.clustering.infinispan.subsystem.LockingMetric$1.execute(LockingMetric.java:38)
keycloak_1 | at
org.jboss.as.clustering.infinispan.subsystem.LockingMetricExecutor.execute(LockingMetricExecutor.java:46)
keycloak_1 | at
org.jboss.as.clustering.infinispan.subsystem.LockingMetricExecutor.execute(LockingMetricExecutor.java:37)
keycloak_1 | at
org.jboss.as.clustering.controller.MetricHandler.executeRuntimeStep(MetricHandler.java:75)
keycloak_1 | at
org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:59)
keycloak_1 | at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
keycloak_1 | at
org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
keycloak_1 | at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
keycloak_1 | at
org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1411)
keycloak_1 | at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
keycloak_1 | at
org.jboss.as.controller.ModelControllerImpl.lambda$execute$0(ModelControllerImpl.java:227)
keycloak_1 | at
org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:265)
keycloak_1 | at
org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:231)
keycloak_1 | at
org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:227)
keycloak_1 | at
org.jboss.as.jmx.model.ModelControllerMBeanHelper.execute(ModelControllerMBeanHelper.java:555)
keycloak_1 | at
org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttribute(ModelControllerMBeanHelper.java:316)
keycloak_1 | at
org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttributes(ModelControllerMBeanHelper.java:294)
keycloak_1 | at
org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.getAttributes(ModelControllerMBeanServerPlugin.java:146)
keycloak_1 | at
org.jboss.as.jmx.PluggableMBeanServerImpl.getAttributes(PluggableMBeanServerImpl.java:416)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.jmx.JmxScraper.scrapeBean(JmxScraper.java:151)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.jmx.JmxScraper.doScrape(JmxScraper.java:117)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:460)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:216)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:137)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.client.exporter.common.TextFormat.write004(TextFormat.java:22)
keycloak_1 | at
io.prometheus.jmx.shaded.io.prometheus.client.exporter.HTTPServer$HTTPMetricHandler.handle(HTTPServer.java:59)
keycloak_1 | at
com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
keycloak_1 | at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
keycloak_1 | at
com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
keycloak_1 | at
sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
keycloak_1 | at
com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
keycloak_1 | at
sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
keycloak_1 | at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
keycloak_1 | at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
keycloak_1 | at java.lang.Thread.run(Thread.java:748)
We're getting this error on Keycloak 6.0.0, 5.0.0 and 4.8.3Final versions
(we didn't try with previous versions). Is there something we're missing?
Thank you in advance,
Matteo
--
Like <https://www.facebook.com/cuebiq/> I Follow
<https://twitter.com/Cuebiq>I Connect
<https://www.linkedin.com/company/cuebiq>
This email is reserved
exclusively for sending and receiving messages inherent working activities,
and is not intended nor authorized for personal use. Therefore, any
outgoing messages or incoming response messages will be treated as company
messages and will be subject to the corporate IT policy and may possibly to
be read by persons other than by the subscriber of the box. Confidential
information may be contained in this message. If you are not the address
indicated in this message, please do not copy or deliver this message to
anyone. In such case, you should notify the sender immediately and delete
the original message.
More information about the keycloak-user
mailing list