tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Filchak <sub...@zuka.net>
Subject Re: General config errors
Date Fri, 15 May 2009 01:02:59 GMT
Caldarale, Charles R wrote:
>
> From where?  The Tomcat web site, or a 3rd-party repackage?
>   
tomcat website/
>   
>> every time I add a second host to server.xml, it kills 
>> the connector port.
>>     
>
> What does "kills the connector port" mean?  I've never seen an error message or log entry
with those words in it.
>   
Once the default host was running, I issued: netstat -pan | grep LISTEN 
| grep tcp and it showed java listening on port 8005, 8009 and 8080 ... 
all default.
>   
>> the connector port on 8009 disappears
>>     
>
> Disappears from what?
>   
When I add the second host (the exodus app) and restart tomcat and run 
netstat -pan | grep LISTEN | grep tcp again, port 8009 no longer shows 
up and neither does the new port for the second connector on 8010. 
Happens consistently. And it should be noted for those that feel there 
is something else running on this machine i.e. another install or two of 
tomcat or red5 server, I have killed red5 and no other java entry shows 
up under netstat except the ones I expect.
>   
>> the new port for the second host is not there either.
>>     
>
> <Host>s don't have ports, <Connector>s do.  All <Host>s within an <Engine>
share all the <Connector>s for that <Engine>.
>
>   
yes ... mis-stated. Sorry.
>> Any ideas?
>>     
>
> Post your server.xml so we can look at it.
>   
DEFAULT: (this one works)

<?xml version='1.0' encoding='utf-8'?>

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

  <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="Catalina">
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost">

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>
    </Engine>
  </Service>
</Server>

DEFAULT workers.properties

worker.list=rosewood

#
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
#

worker.rosewood.type=ajp13
worker.rosewood.host=localhost
worker.rosewood.port=8009



<?xml version='1.0' encoding='utf-8'?>

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

  <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="Catalina">
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

   <!-- Define an AJP 1.3 Connector on port 8010 -->
    <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost">

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>
       <Host name="exodus.zuka.net"  appBase="/web/exodus.zuka.net/docs"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
       </Host>
    </Engine>
  </Service>
</Server>

Updated  workers.properties

worker.list=rosewood,exodus

#
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
#

worker.rosewood.type=ajp13
worker.rosewood.host=localhost
worker.rosewood.port=8009

worker.exodus.type=ajp13
worker.exodus.host=exodus.zuka.net
worker.exodus.port=8010


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


Mime
View raw message