6 Replies Latest reply on Jun 4, 2010 4:53 AM by Galder Zamarreño

    Jopr agent not discovering Infinispan cache within Tomcat?

    Jeff Brown Newbie

      Using JON 2.3.1 and have Infinispan 4.0.0GA default cache created within a WAR deployed within Tomcat6.  Have both the Tomcat and Infinispan plugins installed on JON.

       

      Tomcat is discovered and controlled and JMX is running on port 6996 as advised in http://community.jboss.org/wiki/MonitoringInfinispanwithJOPR. Infinispan cache is created within WAR and is using plain DefaultCache.

       

      Is it possible to see the Infinispan cache via JON or Jopr when it is deployed in this manner (within Tomcat)?  If not, how is the cache normally deployed so it can be discovered?

       

      Thanks.

        • 1. Re: Jopr agent not discovering Infinispan cache within Tomcat?
          Heiko Rupp Master

          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?

          • 2. Re: Jopr agent not discovering Infinispan cache within Tomcat?
            Galder Zamarreño Master

            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?

            • 3. Re: Jopr agent not discovering Infinispan cache within Tomcat?
              Jeff Brown Newbie

              Galder,

               

              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:

               

              {noformat}

              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.

              {noformat}

               

              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?

              • 4. Re: Jopr agent not discovering Infinispan cache within Tomcat?
                Galder Zamarreño Master

                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?

                • 5. Re: Jopr agent not discovering Infinispan cache within Tomcat?
                  Jeff Brown Newbie

                  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.

                  • 6. Re: Jopr agent not discovering Infinispan cache within Tomcat?
                    Galder Zamarreño Master

                    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