2 Replies Latest reply on Feb 11, 2014 10:49 AM by Motty Cohen

    How to deploy multiple war packages to different virtual hosts listening to different ports on Wildfly?

    Motty Cohen Newbie

      Hi All,

       

      My use case include deployment of two different packages (war files) on a single Wildfly server.

      The first is a standard web application to be accessed from the default http port (as configured in <socket-binding name="http" port="${jboss.http.port:8080}"/>), nothin special so far.

       

      The second war contains some application configuration capabilities and I'd like to restrict access to it using a different port (say: 8099).

      Here are the steps I executed:

       

      1. Adding a new socket binding to the standalone.xml under <socket-binding-group> element:

      <socket-binding name="config-manager" port="8099"/>

       

      2. Adding new server and virtual host in the undertow subsystem configuration:

      <server name="config-server">

           <http-listener name="config-listener" socket-binding="config-manager"/>

           <host name="config-host" alias="localhost">

                <location name="/" handler="welcome-content"/>

           </host>

      </server>

          

      3. Changing jboss-web.xml in the war to deploy it to the new virtual host:

      <virtual-host>config-host</virtual-host>

       

      When running the server I'm getting the following error:

       

      10:01:42,112 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "config-services.war")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [

          "jboss.undertow.deployment.default-server.\"config-server.config-host\"./config is missing [jboss.undertow.server.default-server.\"config-server.config-host\"]",

          "jboss.undertow.deployment.default-server.\"config-server.config-host\"./config.UndertowDeploymentInfoService is missing [jboss.undertow.server.default-server.\"config-server.config-host\"]"

      ]}

      10:01:42,178 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "config-services.war" (runtime-name : "config-services.war")

      10:01:42,181 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.undertow.server.default-server."config-server.config-host" (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService, service jboss.undertow.deployment.default-server."config-server.config-host"./config]

       

      10:01:42,189 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

      10:01:42,189 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

      10:01:42,190 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.0.0.CR1 "WildFly" started (with errors) in 5474ms - Started 305 of 359 services (3 services failed or missing dependencies, 90 services are lazy, passive or on-demand)

      10:01:42,421 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016009: Stopping weld service for deployment config-services.war

      10:01:42,450 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment config-services.war (runtime-name: config-services.war) in 46ms

      10:01:42,494 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "config-services.war" (runtime-name: "config-services.war")

      10:01:42,497 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.deployment.unit."config-services.war".WeldBootstrapService (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService, service jboss.undertow.deployment.default-server."config-server.config-host"./config]

            service jboss.deployment.unit."config-services.war".component.Resources.START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService, service jboss.deployment.unit."expresso-config-services.war".deploymentCompleteService, service jboss.undertow.deployment.default-server."config-server.config-host"./config]

            service jboss.deployment.unit."config-services.war".component."com.motty.sample.config.servlets.SecuredServlet".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService]

            service jboss.deployment.unit."config-services.war".component."com.motty.sample.config.servlets.UnsecuredServlet".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService, service jboss.undertow.deployment.default-server."config-server.config-host"./config]

            service jboss.deployment.unit."config-services.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService]

            service jboss.deployment.unit."config-services.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService, service jboss.undertow.deployment.default-server."config-server.config-host"./config]

            service jboss.deployment.unit."config-services.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService]

            service jboss.deployment.unit."config-services.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService, service jboss.deployment.unit."config-services.war".deploymentCompleteService, service jboss.undertow.deployment.default-server."config-server.config-host"./config]

            service jboss.deployment.unit."config-services.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService, service jboss.deployment.unit."config-services.war".deploymentCompleteService, service jboss.undertow.deployment.default-server."config-server.config-host"./config]

            service jboss.deployment.unit."config-services.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService]

            service jboss.deployment.unit."config-services.war".ee.ComponentRegistry (missing) dependents: [service jboss.undertow.deployment.default-server."config-server.config-host"./config.UndertowDeploymentInfoService]

       

      10:01:47,209 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015003: Found expresso-config-services.war in deployment directory. To trigger deployment create a file called expresso-config-services.war.dodeploy

       

       

      Any ideas what am I missing here?

       

      Thanks.

      M.