5 Replies Latest reply on Aug 31, 2010 12:15 PM by pferraro

    mod_cluster 1.1.0 and tomcat 6.0.29 issues and questions

    huksley

      Hello!

       

      We have complex infrastructure involving 5x apache httpd servers and 16 tomcats.

      I`ve tried to evaluate mod_cluster as a replacement of stable and working mod_jk.

      mod_cluster features such as dynamic configuration and node status update are very important for us.

      However there is some problems I found.

       

      I am using Windows 7 x64, Java 1.6.0_18-b07 32bit,

      Tomcat 6.0.29 + APR 1.1.20

      + load_demo webapp.

       

      1. Logging configured incorrectly. If started with debugger, I can see that jboss logging is configured to

      use NullLoggerPlugin. To force to use JDK14LoggerPlugin I need

      to

      set JAVA_OPTS=-Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.jdk.JDK14LoggerPlugin

       

      2. ROOT context is actually not excluded. If I access http://localhost/mod_cluster-manager/  I see:

       

      /, Status: ENABLED Request: 0 Disable

      I don`t specify excludedContexts in <Listener .. /> directive. Default Tomcat contexts host-manager, manager are not excluded too.

      3. Apache httpd permissions not compatible with production systems, IMHO.
      Official documentation states I need to add

       <Directory />
           Order deny,allow
           Deny from all
           Allow from xxx.xxx.xxx.xx
      </Directory>

      Without it I receive error:
      client denied by server configuration: C:/
      in httpd and
      Error [null: null: {4}] sending command INFO to proxy
      in tomcat.

      Is there any way to workaround requirement to know IP of application server? mod_cluster is all about loose coupling

      and I don`t want to allow whole subnet/everyone full access to server filesystem.

      Maybe INFO/STATUS http requests can go to special virtual path, e.g. STATUS /mod_cluster HTTP/1.0

       

      4. Can be mod_cluster mixed with Tomcat cluster settings?

       

      5. Is it possible to run apache httpd without <VirtualHost>?

      Is it enough to set ServerAdvertise On http://hostname:80?

       

      6. It is not clear when context mounting information is reloaded. I have run without excludedContexts="ROOT"

      and / have got replaced with one from tomcat`s.

      Restarting does not help.

      Only manual delete of logs/manager.* files fixed this situation.

        • 1. Re: mod_cluster 1.1.0 and tomcat 6.0.29 issues and questions
          jfclere

          1) if not configured it goes to NullLoggerPlugin. May be that should be in docs.

          2) docs too.

          3) Not sure why you think it is wrong... The Allow from xxx.xxx.xxx.xx should be a subnet (usually the intranet) additionally it should be in a VirtualHost and you can use proxyURL to use another URL than /

          4) yes that 2 independant things.

          5) yes but see 3.

          6) hm what have you done exactly?

          
          
          • 2. Re: mod_cluster 1.1.0 and tomcat 6.0.29 issues and questions
            huksley

            Thanks for quick response!

             

            1. Logging configured incorrectly.

             

            In ModClusterListener.java there is some attempts to actually initialize logging, but somehow it does not work.


            if (Logger.getPluginClassName() == null)   {
                     String pluginClass = "org.jboss.logging.jdk.JDK14LoggerPlugin";
                     ModClusterListener.class.getClassLoader().loadClass(pluginClass);
                     // We can load it, so let's use it
                     Logger.setPluginClassName(pluginClass);
            }

             

            Maybe we should file a bug?

             

            2. ROOT context is actually not excluded.

            Docs states ROOT excluded by default, however it is not. I have to manually specify excludedContexts="ROOT,manager,host-manager"

             

            3. Apache httpd permissions not compatible with production systems, IMHO.

            If looking into perspective of potentiallly large clusters and networks it is not known beforehand
            which subnet to use.
            Also, proxyURL is not in the current docs.

            6. It is not clear when context mounting information is reloaded.
            > hm what have you done exactly?
            I have not specified excludedContexts on the first run. After that /
            got overrun by tomcat and other web applications (non java, php based) were not working.
            • 3. Re: mod_cluster 1.1.0 and tomcat 6.0.29 issues and questions
              jfclere

              1) ok fill a JIRA.

              2) ok the default doesn't seem to be applied to Tomcat, fill a JIRA.

              3) proxyURL See http://docs.jboss.org/mod_cluster/1.1.0/html/java.properties.html

              6) that looks like a bug (the contexts of the previous CONFIG seem to be reused) fill a JIRA.

              • 4. Re: mod_cluster 1.1.0 and tomcat 6.0.29 issues and questions
                huksley

                1) https://jira.jboss.org/browse/MODCLUSTER-185

                2) https://jira.jboss.org/browse/MODCLUSTER-186

                 

                6) I am unable to provide any details or exact steps to reproduce this problem now, so

                I don`t think it is good to add vague bug report.

                • 5. Re: mod_cluster 1.1.0 and tomcat 6.0.29 issues and questions
                  pferraro

                  Regarding #2, there is no hard coded default value for excludedContexts.

                  The default value for excludedContexts as identified in the documentation actually refers to the default JBoss AS configuration that we ship with mod_cluster. Several of the configuration properties in the docs use the default values from the mod_cluster-jboss-beans.xml file.  However, since we don't ship a default Tomcat server.xml, these default values do not apply.  Perhaps we should?

                  In summary, I don't think this is a bug (i.e. it would be inappropriate to hard code defaults value that are specific to Tomcat), but rather a documentation issue.

                  In fact, now that JBoss AS includes mod_cluster by default, we should consider eventually dropping the mod_cluster.sar packaging (which contains mod_cluster-jboss-beans.xml) entirely.

                  Thoughts?