Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-9124

Infinispan statistics are inaccessible via MBean objects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.1.0.DR13
    • 7.1.0.DR12
    • Clustering
    • None
    • Hide

      1, In JBoss CLI, enable statistics on the cache container:

      /subsystem=infinispan/cache-container=web:write-attribute(name=statistics-enabled,value=true)
      

      2, Enable statistics on the cache (default cache for simplicity):

      /subsystem=infinispan/cache-container=web/distributed-cache=dist:write-attribute(name=statistics-enabled,value=true)
      

      3, Deploy a clustered application (or start the server with standalone-full-ha.xml) - this will start Infinispan caches based on the default cache configuration.
      4, Connect to running EAP via jconsole
      5, Have a look at an MBean object jboss.as:subsystem=infinispan,cache-container=web,distributed-cache=dist
      6, This object has attributes like hits, misses or stores which should now have non-null values, but don't. Alternatively, some other objects under jboss.as.infinispan should make the statistics accessible by JMX for the running caches.

      See the description for more information.

      Show
      1, In JBoss CLI, enable statistics on the cache container: /subsystem=infinispan/cache-container=web:write-attribute(name=statistics-enabled,value= true ) 2, Enable statistics on the cache (default cache for simplicity): /subsystem=infinispan/cache-container=web/distributed-cache=dist:write-attribute(name=statistics-enabled,value= true ) 3, Deploy a clustered application (or start the server with standalone-full-ha.xml ) - this will start Infinispan caches based on the default cache configuration. 4, Connect to running EAP via jconsole 5, Have a look at an MBean object jboss.as:subsystem=infinispan,cache-container=web,distributed-cache=dist 6, This object has attributes like hits , misses or stores which should now have non-null values, but don't. Alternatively, some other objects under jboss.as.infinispan should make the statistics accessible by JMX for the running caches. See the description for more information.

      I'm using a clusterbench deployment. When EAP is started, multiple caches are started, one of which is clusterbench-ee7.ear.clusterbench-ee7-web-default.war [1].

      With DR11 and lower, once statistics were turned on (on cache container web and cache dist), I was able to look at the statistics of the above clusterbench cache by inspecting object

      org.wildfly.clustering.infinispan:type=Cache,name="clusterbench-ee7.ear.clusterbench-ee7-web-default.war(dist_async)",manager="web",component=Statistics
      

      That's no longer possible with DR12 as I seem to only have access to objects under org.jboss.as. Doing

      JMXConnector jmxConnector = null;
      MBeanServerConnection connection = connectToMBeanServer(jmxConnector);
      Object result = connection.getAttribute(new ObjectName(objectName), attribute);
      

      throws

      javax.management.InstanceNotFoundException: org.wildfly.clustering.infinispan:type=Cache,name="clusterbench-ee7.ear.clusterbench-ee7-web-default.war(dist_async)",manager="web",component=Statistics
      	at org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegate(PluggableMBeanServerImpl.java:1117)
      	at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:393)
      	at org.jboss.as.jmx.BlockingNotificationMBeanServer.getAttribute(BlockingNotificationMBeanServer.java:148)
      	at org.jboss.as.jmx.AuthorizingMBeanServer.getAttribute(AuthorizingMBeanServer.java:210)
      	at org.jboss.remotingjmx.protocol.v2.ServerProxy$GetAttributeHandler.handle(ServerProxy.java:689)
      	at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
      	at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:71)
      	at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:66)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:277)
      	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
      	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
      	at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:66)
      	at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
      	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)
      

      There are statistics for the dist cache under org.jboss.as, but since no dist cache is ever started, these never update and attributes like hits or misses always have null values.

      [1]: 15:17:30,925 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool – 66) WFLYCLINF0002: Started clusterbench-ee7.ear.clusterbench-ee7-web-default.war cache from web container

              pferraro@redhat.com Paul Ferraro
              rjanik@redhat.com Richard Janik
              Richard Janik Richard Janik
              Richard Janik Richard Janik
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: