risky_ren 2008-11-12 15:28
浏览 251
已采纳

tomcat5.5.26或者tomcat5.5.27设置cluster

现tomcat5.5.26和tomcat5.5.27在linux上配置集群的时候,总会报附件(catalina.2008-11-12.log.tar.gz) 中的错误。。。
而tomcat6.0.18在该机器上配置三个实例(基本上配置参数和5.x一样),运行正常
公司的老项目需挂在tomcat5.x上,新项目挂6.x上,请各位帮忙解决谢谢

其中的一个instance的server.xml配置:
<?xml version="1.0" encoding="UTF-8"?>

<!-- Comment these entries out to disable JMX MBeans support used for the

   administration web application -->

<!-- Global JNDI resources -->

<!-- Test entry for demonstration purposes -->

<Environment name="simpleValue" type="java.lang.Integer" value="30"/>



<!-- Editable user database that can also be used by

     UserDatabaseRealm to authenticate users -->

<Resource name="UserDatabase" auth="Container"

          type="org.apache.catalina.UserDatabase"

   description="User database that can be updated and saved"

       factory="org.apache.catalina.users.MemoryUserDatabaseFactory"

      pathname="conf/tomcat-users.xml" />

<!-- Define the Tomcat Stand-Alone Service -->

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->

<Connector port="8090" maxHttpHeaderSize="8192"

           maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

           enableLookups="false" redirectPort="8443" acceptCount="100"

           connectionTimeout="20000" disableUploadTimeout="true" />



<!-- Define an AJP 1.3 Connector on port 8009 -->

<Connector port="8019" 

           enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />





<!-- You should set jvmRoute to support load-balancing via AJP ie :   --> 

<Engine name="Standalone" defaultHost="localhost" jvmRoute="tomcat0">         


  <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

         resourceName="UserDatabase"/>




  <Host name="localhost" appBase="webapps"

   unpackWARs="true" autoDeploy="true"

   xmlValidation="false" xmlNamespaceAware="false">





    <!--        -->      

    <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"

             managerClassName="org.apache.catalina.cluster.session.DeltaManager"

             expireSessionsOnShutdown="false"

             useDirtyFlag="true"

             notifyListenersOnReplication="true">



        <Membership 

            className="org.apache.catalina.cluster.mcast.McastService"

            mcastAddr="228.0.2.0"

            mcastPort="45564"

            mcastFrequency="500"

            mcastDropTime="3000"/>



        <Receiver 

            className="org.apache.catalina.cluster.tcp.ReplicationListener"

            tcpListenAddress="auto"

            tcpListenPort="4011"

            tcpSelectorTimeout="100"

            tcpThreadCount="6"/>



        <Sender

            className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"

            replicationMode="pooled"

            ackTimeout="15000"

            waitForAck="true"/>



        <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"

               filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>



        <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"

                  tempDir="/tmp/war-temp/"

                  deployDir="/tmp/war-deploy/"

                  watchDir="/tmp/war-listen/"

                  watchEnabled="false"/>



        <ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

    </Cluster>







  </Host>



</Engine>

[b]问题补充:[/b]
现tomcat5.5.26和tomcat5.5.27在linux上配置集群的时候,总会报附件(catalina.2008-11-12.log.tar.gz) 中的错误。。。
而tomcat6.0.18在该机器上配置三个实例(基本上配置参数和5.x一样),运行正常
公司的老项目(用到了JDK1.4中特有的某些组件)需挂在tomcat5.x上,新项目挂6.x上,请各位帮忙解决谢谢

其中的一个instance的server.xml配置:
<?xml version="1.0" encoding="UTF-8"?>

<Server port="8015" shutdown="SHUTDOWN">

<!-- Comment these entries out to disable JMX MBeans support used for the

   administration web application -->

<Listener className="org.apache.catalina.core.AprLifecycleListener" />

<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />

<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>

<!-- Global JNDI resources -->

<GlobalNamingResources>

&lt;!-- Test entry for demonstration purposes -->

&lt;Environment name="simpleValue" type="java.lang.Integer" value="30"/>


&lt;!-- Editable user database that can also be used by

     UserDatabaseRealm to authenticate users -->

&lt;Resource name="UserDatabase" auth="Container"

          type="org.apache.catalina.UserDatabase"

   description="User database that can be updated and saved"

       factory="org.apache.catalina.users.MemoryUserDatabaseFactory"

      pathname="conf/tomcat-users.xml" />

</GlobalNamingResources>

<!-- Define the Tomcat Stand-Alone Service -->

<Service name="Catalina">

&lt;!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->

&lt;Connector port="8090" maxHttpHeaderSize="8192"

           maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

           enableLookups="false" redirectPort="8443" acceptCount="100"

           connectionTimeout="20000" disableUploadTimeout="true" />


&lt;!-- Define an AJP 1.3 Connector on port 8009 -->

&lt;Connector port="8019" 

           enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />


&lt;!-- You should set jvmRoute to support load-balancing via AJP ie :   --> 

&lt;Engine name="Standalone" defaultHost="localhost" jvmRoute="tomcat0">         

  &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm"

         resourceName="UserDatabase"/>

  &lt;Host name="localhost" appBase="webapps"

   unpackWARs="true" autoDeploy="true"

   xmlValidation="false" xmlNamespaceAware="false">


    &lt;!--        -->      

    &lt;Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"

             managerClassName="org.apache.catalina.cluster.session.DeltaManager"

             expireSessionsOnShutdown="false"

             useDirtyFlag="true"

             notifyListenersOnReplication="true">

        &lt;Membership 

            className="org.apache.catalina.cluster.mcast.McastService"

            mcastAddr="228.0.2.0"

            mcastPort="45564"

            mcastFrequency="500"

            mcastDropTime="3000"/>


        &lt;Receiver 
            className="org.apache.catalina.cluster.tcp.ReplicationListener"

            tcpListenAddress="auto"

            tcpListenPort="4011"

            tcpSelectorTimeout="100"

            tcpThreadCount="6"/>

        &lt;Sender
            className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"

            replicationMode="pooled"

            ackTimeout="15000"

            waitForAck="true"/>

        &lt;Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"

               filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>


        &lt;Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"

                  tempDir="/tmp/war-temp/"

                  deployDir="/tmp/war-deploy/"

                  watchDir="/tmp/war-listen/"

                  watchEnabled="false"/>


        &lt;ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

    &lt;/Cluster>


  &lt;/Host>

&lt;/Engine>

</Service>
</Server>

  • 写回答

1条回答 默认 最新

  • iteye_521 2008-11-12 15:35
    关注

    [url]http://www.mail-archive.com/users@tomcat.apache.org/msg37793.html[/url]
    跟你的问题一模一样,顺便说句,tomcat5.5上的项目应该可以直接扔到tomcat6上跑,都遵循servlet规范而servlet规范向下兼容

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog