3 Replies Latest reply on Feb 18, 2014 1:19 PM by wark

    [PLUGIN] Tomcat 7+

    wark Newbie

      Hi guys,

       

      I tried your IRC but I didn't get so much answer on it.. :-(

       

      Therefore, I'm coming here to propose some suggestions... I'm using RHQ 4.9 for Lab purposes because I'm interested to monitor a park of Tomcat 7+.

       

      1) in RHQ 4.9, the plugin isn't able to detect Tomcat if both are running under a technical user (but it's able to import it at least).

       

      In RHQ 4.10, I've seen on the Git that this has been solved (which is great !), however, still things to do... :-)

       

      2) The RPM start/stop has several issues:

           - It can't start/stop a Tomcat7 or Tomcat8 instance (because the code is doing if not Tomcat6 then Tomcat5, then it tries to do a service tomcat5 stop while running tomcat7...)

           - When we run the agent with a technical user, service isn't usable as-is, we've to give sudo access to that user. Unfortunately, the prefix argument isn't taken into account while choosing RPM method :-(

       

      3) "Store Config" JMX MBean is deprecated in Tomcat 7+ and never works... I'm wondering if it's not better to write a new one for Tomcat7+ (a fork of the existing one) and clean-up some code..

       

      Well, this said, I was able to build a "half-working" plugin once... but my Netbeans refuses now to build it again... :-( Otherwise, I would help you in such work if the RHQ community doesn't support the Tomcat plugin anymore (which I doubt since RedHat offers support to JON for EWS).

       

      Let me know if you think this should take place anywhere else than this forum.

       

      Cédric.

        • 1. Re: [PLUGIN] Tomcat 7+
          Heiko Rupp Master

          Hey Cédric,

           

          thanks for contacting us - I saw your ping late last night. What time zone are you in? Irc is definitively a good way for contact.

           

          What errors do you see when building? I think you may want to build against RHQ 4.9 stable jars, that are available from maven repos (should be in central).

           

          About TC support: yes, we will continue supporting that in RHQ, but also need help from guys like you.

           

          Thanks

            Heiko

          • 2. Re: [PLUGIN] Tomcat 7+
            Jean-Frederic Clere Master

            1) knowing what is missing in master is a good way to start.

            2) I need to look to that. On which platform do you have the problem?

            3) the storeconfig is back in the TC code http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/storeconfig/

            • 3. Re: [PLUGIN] Tomcat 7+
              wark Newbie

              Hi Heiko,

               

              Thanks for your reply. I'm in EU timezone (GMT +1). I had the pleasure to speak with John Sanda on it yesterday, definitely, this is quite good.

               

              Well, I did a clone of the git repository, then it should go well at every build if it succeed once... :-( It failed in a surefire test... I'm building it again right now. Windering if it's not a memory allocation issue which would cause the JVM to crash:

               

              Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project rhq-core-plugin-api: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]

               

              Shall I clone RHQ4.9 instead of the last RHQ4.10 ?

               

              Hi Jean-Frederic,

               

              1) What do you mean ? I don't get it, sorry..

              2) I'm running Debian 7.2. The code is that line in the plugin (for both stop and start) - Class TomcatServerOperationDelegate:

               

              String rpm = TomcatDiscoveryComponent.isRPMTomcat6(catalinaHome) ?  TomcatDiscoveryComponent.EWS_TOMCAT_6 : TomcatDiscoveryComponent.EWS_TOMCAT_5;

               

              3) Can't get an answer if this is for Tomcat7 or only the RC of Tomcat8. But thanks anyway. :-)