2 Replies Latest reply on Oct 8, 2015 7:16 AM by Nasir Hussain

    Not able to deploy multiple war packages to different hosts listening to different ports on Wildfly 8.1.0 Final?

    Nasir Hussain Newbie

      Hi All,

       

      My use case is similar to How to deploy multiple war packages to different virtual hosts listening to different ports on Wildfly? which includes deployment of two different packages (war files) on a single Wildfly server.

       

      In standalone-full.xml my socket-binding-group looks like this after addition of the extra socket as below

          <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

              <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>

              <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>

              <socket-binding name="http" port="${jboss.http.port:8080}"/>

              <socket-binding name="https" port="${jboss.https.port:8443}"/>

              <socket-binding name="jacorb" interface="unsecure" port="3528"/>

              <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>

              <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>

              <socket-binding name="txn-recovery-environment" port="4712"/>

              <socket-binding name="txn-status-manager" port="4713"/>

              <socket-binding name="mylocal-internal" port="8099"/>

              <outbound-socket-binding name="mail-smtp">

                  <remote-destination host="localhost" port="25"/>

              </outbound-socket-binding>

          </socket-binding-group>

       

      In standalone-full.xml my Subsystem looks like this after addition of the external server as shown below

      <subsystem xmlns="urn:jboss:domain:undertow:1.1">

                  <buffer-cache name="default"/>

                  <server name="default-server">

                      <http-listener name="default" socket-binding="http"/>

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

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

                          <filter-ref name="server-header"/>

                          <filter-ref name="x-powered-by-header"/>

                          <single-sign-on path="/"/>

                      </host>

                  </server>

                  <server name="mylocal-internal-server">

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

                      <host name="mylocal-host" alias="localhost2">

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

                          <filter-ref name="server-header"/>

                          <filter-ref name="x-powered-by-header"/>

                          <single-sign-on path="/"/>

                      </host>

                  </server>

                  <servlet-container name="default">

                      <jsp-config/>

                  </servlet-container>

                  <handlers>

                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>

                  </handlers>

                  <filters>

                      <response-header name="server-header" header-name="Server" header-value="WildFly/8"/>

                      <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>

                  </filters>

         </subsystem>

       

      Also my jetty-web.xml file for myapp war looks like the following

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"

        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="

            http://www.jboss.com/xml/ns/javaee

            http://www.jboss.org/j2ee/schema/jboss-web_8_0.xsd">

        <context-root>/myapp</context-root>

        <virtual-host>mylocal-host</virtual-host>

        <server-instance>mylocal-internal-server</server-instance>

      </jboss-web>

       

      Everything deploys successfully when i upload and deploy the war file through admin console at 9990, but when i try accessing myapp on the new port 8099 then i am getting 404 Not Found error.

      I am trying to access it like http://mydomain:8099/myapp


      However if i deploy my war for port 8080 then it is available successfully at http://mydomain:8080/myapp


      Please advice on this.