9 Replies Latest reply on Oct 10, 2013 9:14 AM by Tomaz Cerar

    Multiple HTTP Ports

    Arthur C. Newbie

      Hi,

      is there a way to define multiple HTTP Ports for wildfly/undertow?

      I tried to add an additional http-listener, same way like adding additional connectors in Jboss but it didn't work out.

       

      I need an web application to be available on two different ports.

        • 1. Re: Multiple HTTP Ports
          Arthur C. Newbie

          Hi,

           

          some additional remarks:

           

          It looks like I can add a new HTTP port by using the administration console, http://localhost:9990/console

          The UI adds then a new http listener to the undertow subsystem, same way as I did previous manually.

          As soon I restart the server I get an exception.

           

          13:37:32,210 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 49) JBAS014612: Operation ("add") failed - address: ([

              ("subsystem" => "undertow"),

              ("server" => "default-server")

          ])

          • 2. Re: Multiple HTTP Ports
            Tomaz Cerar Master

            did you configure different socket-binding?

            • 3. Re: Multiple HTTP Ports
              Arthur C. Newbie

              Yes I do,

               

              As I mentioned, it is working when I add an new HTTP Listener using the console application. The application modifies the standalone.xml.

              As soon I restart the server and the standalone.xml is read, I get the errors.

              • 4. Re: Multiple HTTP Ports
                Tomaz Cerar Master

                can you post your undertow subsystem configuration

                and socket binding configuration (on bottom of xml file)

                • 5. Re: Multiple HTTP Ports
                  Arthur C. Newbie

                  Sure,

                   

                   

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

                              <buffer-caches>

                                  <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>

                              </buffer-caches>

                              <server name="default-server">

                                  <http-listener name="default" max-post-size="10485760" socket-binding="http"/>

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

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

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

                                  </host>

                              </server>

                              <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">

                                  <jsp-config/>

                                  <persistent-sessions path="persistent-web-sessions" relative-to="jboss.server.data.dir"/>

                              </servlet-container>

                              <handlers>

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

                              </handlers>

                          </subsystem>

                   

                   

                   

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

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

                          <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="80"/>

                          <socket-binding name="httpSLWS" port="4502"/>

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

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

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

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

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

                          </outbound-socket-binding>

                      </socket-binding-group>

                  • 6. Re: Multiple HTTP Ports
                    Tomaz Cerar Master

                    looks fine!

                     

                    can you post also full server.log from boot process. as that failed operation does not tell much atm.

                    • 7. Re: Re: Multiple HTTP Ports
                      Arthur C. Newbie

                      This is the corresponding serverl.log

                      • 8. Re: Multiple HTTP Ports
                        Tomaz Cerar Master

                        This is a bug! I will send PR with a fix in few minutes.