Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Tomcat
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      OS:win2003

      Description

      1.Modify server.xml under var/catalina/ as tomcat how-to-cluster doc as below:
      <Engine name="Catalina" defaultHost="$

      {ServerHostname}

      " jvmRoute="node2" channelSendOptions="8">
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">
      <Manager className="org.apache.catalina.ha.session.DeltaManager"
      expireSessionsOnShutdown="false"
      notifyListenersOnReplication="true"/>

      <Channel className="org.apache.catalina.tribes.group.GroupChannel">
      <Membership className="org.apache.catalina.tribes.membership.McastService"
      address="228.0.0.4"
      port="45564"
      frequency="500"
      dropTime="3000"/>
      <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
      address="auto"
      port="4000"
      autoBind="100"
      selectorTimeout="5000"
      maxThreads="6"/>

      <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
      <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
      </Sender>
      <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
      <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
      </Channel>

      <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
      filter=""/>
      <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>

      <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
      tempDir="/tmp/war-temp/"
      deployDir="/tmp/war-deploy/"
      watchDir="/tmp/war-listen/"
      watchEnabled="false"/>

      <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
      <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
      </Cluster>
      ....
      </Engine>

      2.And deploy web apps whose web.xml containing <distributable> element succesfully
      3.Configure Apache http server with mod_jk, but errors in mod_jk.log
      [error] jk_ajp_common.c (1011): (NODE2) can't receive the response message from tomcat, network problems or tomcat (9.186.10.167:8009) is down (errno=60)
      [Wed Aug 19 14:01:45 2009] [6828:5876] [error] jk_ajp_common.c (1766): (NODE2) Tomcat is down or refused connection. No response has been sent to the client (yet)
      [Wed Aug 19 14:01:45 2009] [6828:5876] [info] jk_ajp_common.c (2186): (NODE2) sending request to tomcat failed (recoverable), (attempt=1)
      [Wed Aug 19 14:02:03 2009] [6828:1212] [error] jk_ajp_common.c (1011): (NODE1) can't receive the response message from tomcat, network problems or tomcat (9.186.10.67:8009) is down (errno=60)
      [Wed Aug 19 14:02:03 2009] [6828:1212] [error] jk_ajp_common.c (1766): (NODE1) Tomcat is down or refused connection. No response has been sent to the client (yet)

      If i follow tomcat cluster steps used in g 2.1.* to work on G 2.2 snapshot, it does't work also, when deploy web app, there is an error:
      org.apache.geronimo.common.DeploymentException: Unable to resolve reference "NextValve"

        Activity

        viola.lu created issue -
        viola.lu made changes -
        Field Original Value New Value
        Attachment servlet-examples-cluster-server1.war [ 12416978 ]
        Attachment servlet-examples-cluster-plan.xml [ 12416979 ]
        Hide
        Shawn Jiang added a comment -

        Currently, geronimo does not support tomcat clustering through server.xml.

        but, you still can try to config the tomcat clustering with GBean way. With two changes to the plans:

        1, in your geronimo-web.xml, add a <type>TomcatValve</type> to the nextValve of ReplicationValve element.

            <gbean class="org.apache.geronimo.tomcat.ValveGBean" name="ReplicationValve">
                <attribute name="className">org.apache.catalina.ha.tcp.ReplicationValve</attribute>
                <attribute name="initParams">filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</attribute>
                <reference name="NextValve">
                    <type>TomcatValve</type>
                    <name>JvmRouteBinderValve</name>
                </reference>
            </gbean>
        

        2, remove the security elements from both geronimo-web.xml and web.xml. There might be a security deployment problem due to recent security changes to 22 and trunk. But it's another issue.

        Show
        Shawn Jiang added a comment - Currently, geronimo does not support tomcat clustering through server.xml. but, you still can try to config the tomcat clustering with GBean way. With two changes to the plans: 1, in your geronimo-web.xml, add a <type>TomcatValve</type> to the nextValve of ReplicationValve element. <gbean class= "org.apache.geronimo.tomcat.ValveGBean" name= "ReplicationValve" > <attribute name= "className" >org.apache.catalina.ha.tcp.ReplicationValve</attribute> <attribute name= "initParams" >filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</attribute> <reference name= "NextValve" > <type>TomcatValve</type> <name>JvmRouteBinderValve</name> </reference> </gbean> 2, remove the security elements from both geronimo-web.xml and web.xml. There might be a security deployment problem due to recent security changes to 22 and trunk. But it's another issue.
        Hide
        Chi Runhua added a comment - - edited

        Thanks Shawn for the solution. I also removed the security constraints and realm info from both web.xml and deployment plan.

        Now the application can be deployed on G2.2 using GBean method but with the following warning in the log

        2009-09-03 17:22:12,276 WARN [TomcatModuleBuilder] No clustering builders configured: app will not be clustered
        2009-09-03 17:22:12,824 WARN [SimpleTcpCluster] setManagerClassName is deprecated, use nested <Manager> element inside the <Cluster> element instead, this request will be ignored.
        ....

        Jeff C

        Show
        Chi Runhua added a comment - - edited Thanks Shawn for the solution. I also removed the security constraints and realm info from both web.xml and deployment plan. Now the application can be deployed on G2.2 using GBean method but with the following warning in the log 2009-09-03 17:22:12,276 WARN [TomcatModuleBuilder] No clustering builders configured: app will not be clustered 2009-09-03 17:22:12,824 WARN [SimpleTcpCluster] setManagerClassName is deprecated, use nested <Manager> element inside the <Cluster> element instead, this request will be ignored. .... Jeff C
        Hide
        Shawn Jiang added a comment -

        The warning should be OK, please ignore it to see if the clustering is really working. Thanks.

        Show
        Shawn Jiang added a comment - The warning should be OK, please ignore it to see if the clustering is really working. Thanks.
        Hide
        Ben Liang added a comment -

        Thanks Shawn,your solution can solve this problem well.

        About the security elements, we can leave them in the geronimo-web.xml and web.xml ,we just need to add the dependency in the geronimo-web.xml like this:
        <dep:dependencies>
        <dep:dependency>
        <dep:groupId>console.realm</dep:groupId>
        <dep:artifactId>geronimo-properties-realm</dep:artifactId>
        <dep:version>1.0</dep:version>
        <dep:type>car</dep:type>
        </dep:dependency>
        </dep:dependencies>

        then the realm problem can be solved.

        Show
        Ben Liang added a comment - Thanks Shawn,your solution can solve this problem well. About the security elements, we can leave them in the geronimo-web.xml and web.xml ,we just need to add the dependency in the geronimo-web.xml like this: <dep:dependencies> <dep:dependency> <dep:groupId>console.realm</dep:groupId> <dep:artifactId>geronimo-properties-realm</dep:artifactId> <dep:version>1.0</dep:version> <dep:type>car</dep:type> </dep:dependency> </dep:dependencies> then the realm problem can be solved.
        Hide
        Shawn Jiang added a comment -

        Thanks Ben,

        We need to update the 2.2 doc per tomcat native clustering.

        Show
        Shawn Jiang added a comment - Thanks Ben, We need to update the 2.2 doc per tomcat native clustering.
        Hide
        Shawn Jiang added a comment -

        Resolved.

        Show
        Shawn Jiang added a comment - Resolved.
        Shawn Jiang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Chi Runhua added a comment -

        G2.2 doc updated accordingly.

        http://cwiki.apache.org/GMOxDOC22/tomcat-native-clustering.html

        Any questions, please let me know.

        Jeff C

        Show
        Chi Runhua added a comment - G2.2 doc updated accordingly. http://cwiki.apache.org/GMOxDOC22/tomcat-native-clustering.html Any questions, please let me know. Jeff C
        Shawn Jiang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Shawn Jiang
            Reporter:
            viola.lu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development