The default discovery for Infinispan was meant for standalone instances. Now you say you deployed within Tomcat.
Do the Infinispan MBeans show up in Tomcat's MBeanserver at all?
Can you connect to said server e.g. via jconsole and verify that the Infinispan MBeans show up?
Jeff, can u confirm that either:
- The cache configuration file contains globalJmxStatistics and jmxStatistics enabled? For example:
<?xml version="1.0" encoding="UTF-8"?> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:infinispan:config:4.0"> <global> <transport clusterName="demoCluster"/> <globalJmxStatistics enabled="true" jmxDomain="infinispan"/> </global> <default> <clustering mode="distribution"> <l1 enabled="false" lifespan="60000"/> <hash numOwners="2" rehashRpcTimeout="60000"/> <sync/> </clustering> <jmxStatistics enabled="true"/> </default> </infinispan>
- Or if the configuration used is created programatically, that jmx statistics are enabled via configuration setter calls?
I used the config you provided and it did not seem to help. When I issue the "discovery" command via the JON agent, I see this error:
Infinispan.Infinispan Cache Manager: Starting discovery...
java.lang.Exception:Discovery component invocation failed. -> java.lang.IndexOutOfBoundsException:Index: 0, Size: 0
Infinispan.Infinispan Cache Manager: Done.
I did also check the Tomcat via JConsole as also suggested and did NOT see the Infinispan MBEANS.
So I am thinking the plug-in only detects standalone instances. Is that how most use cases with Infinispan are being done in your experience?
Jeff, so far I've only tested Infinispan being monitored when running standalone but I can't see what would be different when running under Tomcat or AS as long as the jmx settings were set up correctly. The failure you refer to is inconclusive as it has no stacktrace. Can you make sure you provide a full stacktrace and attach any relevant logs?
Also, can provide steps to replicate this issue?
I found last night, what I think is the cause. I am using Infinispan as the repository source for a ModeShape JCR using this connector. The "cacheConfigurationName" property for that connector is being ignored and that bug is already in JIRA. So what was happening is that the connector was then creating a local cache only. I'm in the middle of a workaround to start Infinispan outside ModeShape and bind to JNDI and then access via JNDI, which reportedly does work in the connector. Early, but I did verify that I can now see the Infinispan MBeans under Tomcat via JConsole now that my config file is actually being used, so that looks promising. May have to do some juggling on my side though because Tomcat's JNDI appears to be read-only. I will check back in with an update later this week as to what I find. Thanks again.
Jeff, it'd be great if you could create a wiki explaining any extra steps you had to do to monitor an Infinispan based ModeShape JCR node via JOPR