From users-return-265475-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Sat Sep 1 11:04:01 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3EB80180630 for ; Sat, 1 Sep 2018 11:04:01 +0200 (CEST) Received: (qmail 77174 invoked by uid 500); 1 Sep 2018 09:03:59 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 77163 invoked by uid 99); 1 Sep 2018 09:03:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Sep 2018 09:03:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1E14518067F for ; Sat, 1 Sep 2018 09:03:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.301 X-Spam-Level: X-Spam-Status: No, score=-2.301 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id uFiLE6svhVSK for ; Sat, 1 Sep 2018 09:03:57 +0000 (UTC) Received: from mailproxy02.manitu.net (mailproxy02.manitu.net [217.11.48.66]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id ACA1C5F1E3 for ; Sat, 1 Sep 2018 09:03:56 +0000 (UTC) Received: from [10.1.1.71] (p4FCE64BC.dip0.t-ipconnect.de [79.206.100.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: u11666@mayr-stefan.de) by mailproxy02.manitu.net (Postfix) with ESMTPSA id 72D7A1020160 for ; Sat, 1 Sep 2018 11:03:49 +0200 (CEST) Subject: Re: Multiple Hosts in server.xml - expected behaviour? To: users@tomcat.apache.org References: <2e6cc5d6-bda2-84d0-953c-cd0ebf57d734@mayr-stefan.de> From: Stefan Mayr Message-ID: <29b48595-328a-d171-864c-5b288ea74bcc@mayr-stefan.de> Date: Sat, 1 Sep 2018 11:03:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit 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 will deploy a > separate copy of each web application found in "webapps". If you have > 3 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