You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/09/01 17:43:03 UTC
DO NOT REPLY [Bug 51753] New: When specifying multiple
elements, only the applications in the first one with a host called
"localhost" are deployed
https://issues.apache.org/bugzilla/show_bug.cgi?id=51753
Bug #: 51753
Summary: When specifying multiple <Service> elements, only the
applications in the first one with a host called
"localhost" are deployed
Product: Tomcat 7
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: critical
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: niki.driessen@gmail.com
Classification: Unclassified
consider following setup:
Tomcat server.xml:
------------------
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<!--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>
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1" maxThreads="150"
connectionTimeout="20000" URIEncoding="UTF-8"
useBodyEncodingForURI="false"
redirectPort="443" />
<Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8"
useBodyEncodingForURI="false" redirectPort="443" />
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false" deployOnStartup="true"
xmlValidation="false" xmlNamespaceAware="false"/>
</Engine>
</Service>
<Service name="CatalinaMobile">
<Connector port="9090" protocol="HTTP/1.1" maxThreads="150"
connectionTimeout="20000" URIEncoding="UTF-8"
useBodyEncodingForURI="false"
redirectPort="443" />
<Connector port="9009" protocol="AJP/1.3" URIEncoding="UTF-8"
useBodyEncodingForURI="false" redirectPort="443" />
<Engine name="CatalinaMobile" defaultHost="localhost">
<Host name="localhost" appBase="webapps-mobile"
unpackWARs="true" autoDeploy="false" deployOnStartup="true"
xmlValidation="false" xmlNamespaceAware="false"/>
</Engine>
</Service>
</Server>
All the directories have been created (conf/CatalineMobile/localhost,
webapps-mobile)
Both Engines have a ROOT webapp deployed. However, when starting tomcat,
only the applications for the FIRST <Service> are being started
See below the output from tomcat:
cmd /c E:\dev-env\tomcat\bin\catalina.bat run
-Xms256M -Xmx1024M -Dsolr.solr.home=E:\dev-env\solr\ -Xdebug
-Xrunjdwp:transport=dt_socket,address=127.0.0.1:4933,suspend=y,server=n
Using CATALINA_BASE: "C:\Documents and
Settings\nd828245\.IntelliJIdea10\system\tomcat\Unnamed_ecommerce"
Using CATALINA_HOME: "E:\dev-env\tomcat"
Using CATALINA_TMPDIR: "E:\dev-env\tomcat\temp"
Using JRE_HOME: "E:\dev-env\java"
Using CLASSPATH: "E:\dev-env\tomcat\bin\bootstrap.jar"
Connected to the target VM, address: '127.0.0.1:4933', transport: 'socket'
1-sep-2011 17:30:58 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-9090
1-sep-2011 17:30:58 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
1-sep-2011 17:30:58 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 402 ms
1-sep-2011 17:30:58 org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name CatalinaMobile
1-sep-2011 17:30:58 org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
1-sep-2011 17:30:58 org.apache.catalina.core.StandardService start
INFO: Starting service CatalinaMobile
1-sep-2011 17:30:58 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
1-sep-2011 17:30:58 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
1-sep-2011 17:30:59 org.apache.catalina.core.ApplicationContext log
<----- SNIP APPLICATION BOOTSTRAP LOGGING ---->
1-sep-2011 17:31:23 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-9090
1-sep-2011 17:31:23 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:9009
1-sep-2011 17:31:23 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/32 config=null
1-sep-2011 17:31:23 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
1-sep-2011 17:31:23 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
1-sep-2011 17:31:23 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
1-sep-2011 17:31:23 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
1-sep-2011 17:31:23 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/0 config=null
1-sep-2011 17:31:23 org.apache.catalina.startup.Catalina start
INFO: Server startup in 24969 ms
Connected to server
As you can see, no attempt to even start any application is made for the second
Service.
Swapping the order of the <Service> elements in server.xml indicates only the
FIRST one is taken into account.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 51753] When specifying multiple
elements, only the applications in the first one with a host called
"localhost" are deployed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51753
--- Comment #1 from niki.driessen@gmail.com 2011-09-01 15:59:47 UTC ---
By the way, as you will notice in the server.xml I supplied (which is a tomcat
6 one), I also tested this on tomcat 6, same result...
The same setup on tomcat 7 produces the exact same result
Tested on:
Tomcat 6
Tomcat 7.0.20
Tested on:
Windows XP
Redhat Linux Enterprise 5
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 51753] When specifying multiple
elements, only the applications in the first one with a host called
"localhost" are deployed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51753
niki.driessen@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #3 from niki.driessen@gmail.com 2011-09-02 16:53:26 UTC ---
I tried it on clean installs of each version
Anyway, issue seems related to the IDE used to start Tomcat
so I reported the bug on their side now
Thanks for looking into it and apologies for not considering in the first place
that the IDE might have something to do with it :-s
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 51753] When specifying multiple
elements, only the applications in the first one with a host called
"localhost" are deployed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51753
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
--- Comment #2 from Mark Thomas <ma...@apache.org> 2011-09-02 12:42:40 UTC ---
This works for me on Tomcat 7 using the server.xml you provided.
This looks like a configuration problem and the users list is the place to seek
help.
If you do re-open this issue, you'll need to provide the exact steps to
reproduce this issue on a clean install of the latest release of Tomcat 7.0.x.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org