相关疑难解决方法(0)

Tomcat Cluster Farm Deployer 问题

我已经mod_jk在 ubuntu 服务器上设置了 apache-tomcat 集群。我在FarmDeployer将 war 文件部署到集群中的其他 Web 服务器时遇到了一些问题,我希望它能像我发布的那样工作并使 FarmDeployer 在这里工作。

战争部署器与帖子中的以下配置完美配合,但不能可靠地工作,因为它有时会在访问页面时出现 404 错误:

 <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">
        <Channel className="org.apache.catalina.tribes.group.GroupChannel">
            <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                  address="192.168.1.4"
                  port="4000"
                  selectorTimeout="100"
                  maxThreads="6"/>
            <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
            <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
                <Member className="org.apache.catalina.tribes.membership.StaticMember"
                      port="4000"
                      securePort="-1"
                      host="192.168.1.2"
                      domain="staging-cluster"
                      uniqueId="{0,1,2,3,4,5,6,7,8,9}"/>
            </Interceptor>
        </Channel>
        <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
            tempDir="/usr/share/tomcat/temp/"
            deployDir="/usr/share/tomcat/webapps/"
            watchDir="/usr/share/tomcat/watch/"
            watchEnabled="true"/>
    </Cluster>
  </Host>
Run Code Online (Sandbox Code Playgroud)

以下是完美适用于 HA 和 LB 集群的配置(来自 tomcat cluster docs)。But it fails in Farm Deployer并且日志中没有任何说明农场部署程序不工作的原因。

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false"> …
Run Code Online (Sandbox Code Playgroud)

cluster load-balancing tomcat6 farmwardeployer apache-2.2

2
推荐指数
1
解决办法
9751
查看次数