6 Replies Latest reply on May 15, 2009 2:16 PM by jay shaughnessy

    jopr 2.2 tomcat and multiple bases

    Roberto Bouza Newbie


      We are trying to set up jopr on a multiple instances bases based tomcat environment.

      The way we have it set up is that we define a base for each application we are running all of them share the tomcat installation main directory for libraries, start up script and main tomcat classes.

      Finally we have a custom made script that based on the base name starts a tomcat instance just setting the CATALINA_BASE property to the correct path.

      ex. service tomcat start app.domain.com where
      CATALINA_BASE=/var/apps/bases/app.domain.com and TOMCAT_HOME=/var/apps/tomcat

      That way we can manage (shutdown, restart, start) instances individually without interrupting all the others running.

      Now a few questions: How can we do deployments of .war files on a setup like this? How can we configure the .war files path and the base path and the tomcat path so jopr knows where the config files, temp dir, work dir etc are located and will be able successfully to perform operations on each base.

      Help is greatly appreciated.

        • 1. Re: jopr 2.2 tomcat and multiple bases
          jay shaughnessy Expert

          Have you tried running Jopr with your current Tomcat setup? If so, what are you seeing? Are the Tomcat servers being discovered and if so, the related connectors, hosts, and web applications?

          I think whether this will work for you depends on whether the host "App Base" property and the web app's "Filename" and "Context Root" properties seem correct. Also, you can update the default start/shutdown scripts as needed by editing them in the Jopr GUI.

          If you can supply some more detail around what is working or not working that would be helpful.

          • 2. Re: jopr 2.2 tomcat and multiple bases
            Roberto Bouza Newbie


            Yes I ran it with the current set up, and actually did a great job discovering all the different instances.

            I'm seeing all the instances as "Tomcat" but the internals (like .war file, locations, app base, etc) are incorrect.

            I don't seem to see the connectors on the GUI...

            I'm going to double check the set up of the "App Base" "Filename" and "Context Root" properties just to make sure we don't have something bad. Anyways I know we are using the tomcat 6 defaults like the context.xml.default on the conf/Catalina/[server name]/ directory, etc.

            I was trying to change like the path for the ROOT.war but I can't seem to do it on the JOPR GUI, I'm guessing you cannot modify it, is just discovered based on the instance.

            let me do a double check on the variables and then I'll get back to the forum.

            Thank you for your help.

            • 3. Re: jopr 2.2 tomcat and multiple bases
              jay shaughnessy Expert

              Just to make sure, did you enable your Tomcat servers for remote jmx access? If you did the Servers should show as available (green), if not they will show unavailable (red). They may also show red if you enabled authenticated JMX access. In this case you will need to supply user/password for the servers in the Server's Inventory->Connection properties in the GUI.

              It sounds like you are seeing available servers but since you say you don't see any discovered Connectors I just want to make sure. For each available Tomcat Server you should see a hierarchy something like:

              Web Applications
              Application Caches
              Tomcat Server JVM
              User Database

              If your server is green but you don't see the children then something isn't right. Or, if you see the children but they are not green then something may not be right...

              • 4. Re: jopr 2.2 tomcat and multiple bases
                Roberto Bouza Newbie

                I really appreciate your help on this.

                I only enabled one server to test. As soon as I get one working I'll enable the rest.

                On the only tomcat server enabled (green one all the others are red) I just see:

                Tomcat Server JVM
                Tomcat VHost

                So I'm guessing that something is bad...

                JMX is enabled as per tomcat docs:

                "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=39016 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

                Thanks for your help.

                • 5. Re: jopr 2.2 tomcat and multiple bases
                  Roberto Bouza Newbie


                  After checking out all the config files. I did some modifications to make it more like the docs.

                  ContextPath is configured, the context.xml file now is ROOT.xml reflecting the context (instead of using a context.xml.default).

                  Double checked the CATALINA_BASE and the appBase directory.

                  Everything looks very good right now, but I'm still seeing on the tomcat host:

                  Tomcat Server JVM
                  Tomcat VHost

                  I added a screenshot so you can see it:


                  So I don't know if I need to do something else to make all the menus appear.

                  Is there a way to increase logging or were the logs are so I can check for errors? Or any other recomendation?

                  Thank you.

                  • 6. Re: jopr 2.2 tomcat and multiple bases
                    jay shaughnessy Expert

                    There is a definite issue with Discovery of your Tomcat Servers. Although the tomcat processes are discovered it seems the discovery code can not handle your configuration well. I think it is failing to properly locate the Tomcat server.xml. Your servers should not be named "Tomcat (null)" but rather Tomcat (port) and your version should not be listed as unknown.

                    This may not be a problem in your configuration but just lack of support for such a config. You may want to enter an issue into the Jopr Jira at


                    Or, if you like, feel free to try and modify the code to your needs.