0 0

tomcat5.5.26或者tomcat5.5.27设置cluster5

现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"?>




<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>



    <!-- 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" />


  </GlobalNamingResources>





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

  <Service name="Catalina">





    <!-- 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>



  </Service>



</Server>


问题补充:
现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配置:
&lt;?xml version="1.0" encoding="UTF-8"?>

&lt;Server port="8015" shutdown="SHUTDOWN">

  &lt;!-- Comment these entries out to disable JMX MBeans support used for the

       administration web application -->

  &lt;Listener className="org.apache.catalina.core.AprLifecycleListener" />

  &lt;Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />

  &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  &lt;Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>


  &lt;!-- Global JNDI resources -->

  &lt;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" />


  &lt;/GlobalNamingResources>


  &lt;!-- Define the Tomcat Stand-Alone Service -->

  &lt;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>

  &lt;/Service>
&lt;/Server>

2008年11月12日 15:28

1个答案 按时间排序 按投票排序

0 0

采纳的答案

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

2008年11月12日 15:35

相关推荐

Global site tag (gtag.js) - Google Analytics