You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/07/29 17:45:27 UTC

cvs commit: jakarta-tomcat-5/resources/confinstall server_1.xml server_2.xml

remm        2003/07/29 08:45:26

  Modified:    resources/confinstall server_1.xml server_2.xml
  Log:
  - Sync the server.xml used by the installer with the main one.
    (somebody please add a "replace token" feature in NSIS ;-) )
  
  Revision  Changes    Path
  1.6       +3 -2      jakarta-tomcat-5/resources/confinstall/server_1.xml
  
  Index: server_1.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/resources/confinstall/server_1.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- server_1.xml	26 Jun 2003 00:11:14 -0000	1.5
  +++ server_1.xml	29 Jul 2003 15:45:26 -0000	1.6
  @@ -82,5 +82,6 @@
            IP address of the remote client.
       -->
   
  -    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
  -    <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
  +    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on the port specified
  +         during installation -->
  +    <Connector 
  
  
  
  1.11      +120 -30   jakarta-tomcat-5/resources/confinstall/server_2.xml
  
  Index: server_2.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/resources/confinstall/server_2.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- server_2.xml	26 Jun 2003 00:14:45 -0000	1.10
  +++ server_2.xml	29 Jul 2003 15:45:26 -0000	1.11
  @@ -1,35 +1,29 @@
  -               minProcessors="5" maxProcessors="100"
  -               enableLookups="true" redirectPort="8443" acceptCount="100"
  +               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
  +               enableLookups="false" redirectPort="8443" acceptCount="100"
                  debug="0" connectionTimeout="20000" 
                  disableUploadTimeout="true" />
  -    <!-- Note : To disable connection timeouts, set connectionTimeout value 
  -     to -1 -->
   
       <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
       <!--
  -    <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
  -               port="8443" minProcessors="5" maxProcessors="75"
  -               enableLookups="true" disableUploadTimeout="true"
  -	       acceptCount="100" debug="0" scheme="https" secure="true">
  -      <Factory className="org.apache.coyote.tomcat5.CoyoteServerSocketFactory"
  -               clientAuth="false" protocol="TLS" />
  +    <Connector port="8443" 
  +               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
  +               enableLookups="false" disableUploadTimeout="true"
  +               acceptCount="100" debug="0" scheme="https" secure="true">
  +      <Factory clientAuth="false" protocol="TLS" />
       </Connector>
       -->
   
       <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
  -    <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
  -               port="8009" minProcessors="5" maxProcessors="75"
  -               enableLookups="true" redirectPort="8443"
  -               acceptCount="10" debug="0" connectionTimeout="0"
  -               useURIValidationHack="false"
  -               protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
  +    <Connector port="8009" 
  +               enableLookups="false" redirectPort="8443" debug="0"
  +               protocol="AJP/1.3" />
   
       <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
       <!-- See proxy documentation for more information about using this. -->
       <!--
  -    <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
  -               port="8082" minProcessors="5" maxProcessors="75"
  -               enableLookups="true"
  +    <Connector port="8082" 
  +               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
  +               enableLookups="false"
                  acceptCount="100" debug="0" connectionTimeout="20000"
                  proxyPort="80" disableUploadTimeout="true" />
       -->
  @@ -39,6 +33,10 @@
            analyzes the HTTP headers included with the request, and passes them
            on to the appropriate Host (virtual host). -->
   
  +    <!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
  +    <Engine name="Standalone" defaultHost="localhost" debug="0" jmvRoute="jvm1">         
  +    --> 
  +         
       <!-- Define the top level container in our container hierarchy -->
       <Engine name="Catalina" defaultHost="localhost" debug="0">
   
  @@ -110,28 +108,120 @@
         -->
   
         <!-- Define the default virtual host -->
  -      <Host name="localhost" debug="0" appBase="webapps" 
  +      <Host name="localhost" debug="0" appBase="webapps"
          unpackWARs="true" autoDeploy="true">
   
         <!-- Add the following attributes if you want to turn XML validation
              on. Remember to comment the Host element above. 
              
  -           Note: XML Schema validation will work with Xerces 2.0.1 or 
  +           Note: XML Schema validationn will works with Xerces 2.0.1 or 
              Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent 
  -           their use with Tomcat -->
  +           their use with Tomcat-->
         <!--
         <Host name="localhost" debug="0" appBase="webapps"
          unpackWARs="true" autoDeploy="true"
          xmlValidation="true" xmlNamespaceAware="true">
         -->
   
  -        <!-- Uncomment this to cluster this host using JavaGroups. The
  -             protocol attribute can be used to configure the JavaGroups
  -             network stack (the defaults are used if it's not specified). -->
  +        <!-- Defines a cluster for this node,
  +             By defining this element, means that every manager will be changed.
  +             So when running a cluster, only make sure that you have webapps in there
  +             that need to be clustered and remove the other ones.
  +             A cluster has the following parameters:
  +
  +             className = the fully qualified name of the cluster class
  +
  +             name = a descriptive name for your cluster, can be anything
  +
  +             debug = the debug level, higher means more output
  +
  +             mcastAddr = the multicast address, has to be the same for all the nodes
  +
  +             mcastPort = the multicast port, has to be the same for all the nodes
  +
  +             mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
  +
  +             mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
  +
  +             tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes 
  +
  +             tcpListenAddress = the listen address (bind address) for TCP cluster request on this host, 
  +                                in case of multiple ethernet cards.
  +                                auto means that address becomes
  +                                InetAddress.getLocalHost().getHostAddress()
  +
  +             tcpListenPort = the tcp listen port
  +
  +             tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
  +                                  has a wakup bug in java.nio. Set to 0 for no timeout
  +
  +             printToScreen = true means that managers will also print to std.out
  +
  +             expireSessionsOnShutdown = true means that 
  +
  +             useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
  +                            false means to replicate the session after each request.
  +                            false means that replication would work for the following piece of code:
  +                            <%
  +                            HashMap map = (HashMap)session.getAttribute("map");
  +                            map.put("key","value");
  +                            %>
  +             replicationMode = can be either 'synchronous' or 'asynchronous'.
  +                               * Synchronous means that the thread that executes the request, is also the
  +                               thread the replicates the data to the other nodes, and will not return until all
  +                               nodes have received the information.
  +                               * Asynchronous means that there is a specific 'sender' thread for each cluster node,
  +                               so the request thread will queue the replication request into a "smart" queue,
  +                               and then return to the client.
  +                               The "smart" queue is a queue where when a session is added to the queue, and the same session
  +                               already exists in the queue from a previous request, that session will be replaced
  +                               in the queue instead of replicating two requests. This almost never happens, unless there is a 
  +                               large network delay.
  +        -->             
  +        
  +        <!-- When uncommenting the cluster, REMEMBER to uncomment the replication Valve below as well
  +        
  +
  +        <Cluster  className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
  +                  name="FilipsCluster"
  +                  debug="10"
  +                  serviceclass="org.apache.catalina.cluster.mcast.McastService"
  +                  mcastAddr="228.0.0.4"
  +                  mcastPort="45564"
  +                  mcastFrequency="500"
  +                  mcastDropTime="3000"
  +                  tcpThreadCount="2"
  +                  tcpListenAddress="auto"
  +                  tcpListenPort="4001"
  +                  tcpSelectorTimeout="100"
  +                  printToScreen="false"
  +                  expireSessionsOnShutdown="false"
  +                  useDirtyFlag="true"
  +                  replicationMode="synchronous"
  +        />
  +        -->
           <!--
  -        <Cluster className="org.apache.catalina.cluster.JGCluster"/>
  +            When configuring for clustering, you also add in a valve to catch all the requests
  +            coming in, at the end of the request, the session may or may not be replicated.
  +            A session is replicated if and only if all the conditions are met:
  +            1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
  +            2. a session exists (has been created)
  +            3. the request is not trapped by the "filter" attribute
  +
  +            The filter attribute is to filter out requests that could not modify the session,
  +            hence we don't replicate the session after the end of this request.
  +            The filter is negative, ie, anything you put in the filter, you mean to filter out,
  +            ie, no replication will be done on requests that match one of the filters.
  +            The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
  +
  +            filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
  +            ending with .gif and .js are intercepted.
           -->
  +        <!--
  +        <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
  +               filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
   
  +        -->
           <!-- Normally, users must authenticate themselves to each web app
                individually.  Uncomment the following entry if you would like
                a user to be authenticated the first time they encounter a
  @@ -144,8 +234,8 @@
           -->
   
           <!-- Access log processes all requests for this virtual host.  By
  -             default, log files are created in $CATALINA_HOME/logs.
  -             If you wish, you can specify a different
  +             default, log files are created in the "logs" directory relative to
  +             $CATALINA_HOME.  If you wish, you can specify a different
                directory with the "directory" attribute.  Specify either a relative
                (to $CATALINA_HOME) or absolute path to the desired directory.
           -->
  @@ -163,7 +253,7 @@
                directory.-->
           <Logger className="org.apache.catalina.logger.FileLogger"
                    directory="logs"  prefix="localhost_log." suffix=".txt"
  -	        timestamp="true"/>
  +            timestamp="true"/>
   
           <!-- Define properties for each web application.  This is only needed
                if you want to set non-default properties, or have web application
  @@ -172,7 +262,7 @@
   
           <!-- Tomcat Root Context -->
           <!--
  -          <Context path="" docBase="ROOT" debug="0"/>
  +          <Context path="" docBase="ROOT" debug="0">
           -->
   
         </Host>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org