tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51753] New: When specifying multiple <Service> elements, only the applications in the first one with a host called "localhost" are deployed
Date Thu, 01 Sep 2011 15:43:03 GMT
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


Mime
View raw message