# Migrating Tomcat server



## justin.j (Jun 20, 2011)

Hi,

We're moving from Tomcat 5.5 on Windows to Linux and at the moment we're just planning on the new Linux boxes being a test environment.

I've tried copying and modifying the windows server.xml but had issues, so I recreated it and still can't get it to load and work on the Linux box. I've tried both Tomcat 5.5 and 6 on the new Linux box.

Where have I gone wrong? I've attached the server.xml file (After changing private data).

-----server.xml-----

```
<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      [URL]http://www.apache.org/licenses/LICENSE-2.0[/URL]
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8005" shutdown="SHUTDOWN">
  <!--APR library loader. Documentation at /docs/apr.html -->
  <!--
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  -->
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- 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>

  
  
  <Service name="businessname_internal">
  <Connector port="80"
        maxHttpHeaderSize="8192"
                     maxThreads="150" 
           minSpareThreads="25" 
           maxSpareThreads="75"
                     enableLookups="false" 
           redirectPort="8443" 
           acceptCount="100"
                     connectionTimeout="20000" 
           disableUploadTimeout="true"
           debug="0"/>

  <Connector port="8009" 
                     enableLookups="false" 
           redirectPort="8443"
           protocol="AJP/1.3"
           debug="0"/>
  <Engine name="domainname" 
     defaultHost="localhost">
   <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase"/>
  
   <Host name="test2.domainname.com.au" 
    appBase="webapps"
          unpackWARs="true" 
    autoDeploy="true"
    liveDeploy="false"
          xmlValidation="false" 
    xmlNamespaceAware="false"
    debug="0">
    <Alias>test2</Alias>

    <Value className="org.apache.catalina.authenticator.SingleSignOn" cookieDomain="domainname.com.au" />
    
    <Valve className="org.apache.catalina.valves.AccessLogValve" 
     directory="logs/systems/test"  prefix="test_log." suffix=".txt"
     pattern="combined" resolveHosts="false"/>
    <Context path="" 
     docBase="tst" 
     reloadable="true">
     <Realm className="org.apache.catalina.realm.JNDIRealm" 
       debug="99" 
       connectionURL="[URL="ldap://ldap.domainname.com.au:389/"]ldap://ldap.domainname.com.au:389[/URL]"
        connectionName="[EMAIL="****@domainname.com.au"]****@domainname.com.au[/EMAIL]" 
       connectionPassword="****" 
       userBase="OU=domainname,DC=domainname,DC=com,DC=au"
       userSearch="(sAMAccountName={0})"
        userSubtree="true"
        userRoleName="memberOf"
        roleBase="OU=****,OU=Security Groups,OU=Groups,DC=domainname,DC=com,DC=au"
        roleName="cn"
        roleSearch="(member={0})"/>
     <Resource name="jdbc/SYS1DB" 
       auth="Container" 
          type="javax.sql.DataSource" 
          username="****" 
          password="****"
          driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
          url="jdbc:sqlserver://sql.domainname.com.au:1433"
           selectMethod="cursor"
          maxActive="50" 
          maxIdle="10" 
          maxWait="10" 
          removeAbandoned="true" 
          removeAbandonedTimeout="60" 
          validationQuery="select getdate()"/>
     <Resource name="jdbc/SYS2DB" 
       auth="Container" 
          type="javax.sql.DataSource" 
          username="****" 
          password="****"
          driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
          url="jdbc:sqlserver://sql.domainname.com.au:1433"
           selectMethod="cursor"
          maxActive="50" 
          maxIdle="10" 
          maxWait="10" 
          removeAbandoned="true" 
          removeAbandonedTimeout="60" 
          validationQuery="select getdate()"/>
     <Resource name="jdbc/SYS3DB" 
       auth="Container" 
          type="javax.sql.DataSource" 
          username="****" 
          password="****"
          driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
          url="jdbc:sqlserver://sql.domainname.com.au:1433"
           selectMethod="cursor"
          maxActive="50" 
          maxIdle="10" 
          maxWait="10" 
          removeAbandoned="true" 
          removeAbandonedTimeout="60" 
          validationQuery="select getdate()"/>
     <Resource name="jdbc/SYS4DB" 
        auth="Container" 
         type="javax.sql.DataSource" 
         username="****" 
         password="****"
         driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
         url="jdbc:sqlserver://sql.domainname.com.au:1433"
         selectMethod="Cursor"
         maxActive="50" 
         maxIdle="10" 
         maxWait="10" 
         removeAbandoned="true" 
         removeAbandonedTimeout="60" 
         validationQuery="select getdate()"/>
     <Resource name="mail/SOLITAIRE" 
       auth="Container" 
       type="javax.mail.Session" 
       mail.smtp.host="mail.domainname.com.au"/>
      </Context>
 
    
   </Host>
  </Engine>

 </Service>
  
  
  
  
  
</Server>
```


----------

