tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Mayr <ste...@mayr-stefan.de>
Subject Re: Multiple Hosts in server.xml - expected behaviour?
Date Sat, 01 Sep 2018 09:03:42 GMT
Hi,

Am 31.08.2018 um 19:22 schrieb Christopher Schultz:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Stefan,
> 
> On 8/30/18 23:27, Stefan Mayr wrote:
>> we got an application has multiple Service, Engine and Host entries
>> in server.xml. All Host sections share the same directory:
>>
>> appBase="webapps" unpackWARs="true" autoDeploy="true"
>>
>> Each host contains Context-Section using docBase="webapps/appX"
>> for diffenent applications appX.
>>
>> Is this a valid configuration (for Tomcat 7.0)? If yes, what should
>> we expect to happen?
> 
> Yes, this is valid. You should expect that each <Host> will deploy a
> separate copy of each web application found in "webapps". If you have
> 3 <Host>s and 3 web applications in "webapps", you should expect
> Tomcat to start 9 separate contexts.
> 
>> We currently see and endless loop of application deployments that
>> fail because the ports of the Service Connector is already in use.
> 
> Something else is wrong, then. Connectors are separate from context
> (web app) deployments. Application deployments shouldn't attempt to
> configure connectors.
> 
> Can you post an error and/or stack trace?
> 
> - -chris

You were right. I started counting deployment log entries and failing
contexts. For each context we have n deploments, n being the number of
appBase definitions in Host entries. And because all of those apps seem
to bind additional local tcp ports we have n-1 failing contexts per
Host. Only the first one can bind that port. That led to a lot more
java.net.BindExceptions beeing thrown. I misinterpreted them to be
Connector ports.

Thank you,

   Stefan

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


Mime
View raw message