2 Replies Latest reply on Nov 30, 2015 8:26 AM by Tomaz Cerar

    Wildfly 9.0.2 socket-binding problem with port in use for remote

    Andrew Marlow Newbie

      Hello everyone,

       

      I am struggling with my standalone.xml wildfly configuration. I am using version 9.0.2.Final on Red Hat Enterprise Linux. I am using port number 8180. Port 8080 is taken by a jboss instance that has to run on the same machine.

       

      Here are the socket-binding entries that I have:

       

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

       

      The trouble is, this gives the error 'address already in use'. I can make the error go away by changing one of the port numbers. If I remove the "remoting" line then I get other errors. My apps require that the remoting interface is there.

       

      On Windows I don't get these problems. I admit I am using a slightly older version of wildfly there, version 9.0.1.Final. I use port 8180 throughout.

       

      I thought that wildfly was trying to sort out the plethora of ports used in jboss by reducing them down to just one - the http port. So is a separate remoting port still required?

        • 1. Re: Wildfly 9.0.2 socket-binding problem with port in use for remote
          Micheal Delson Nadar Newbie

          attaching your standalone.xml should help.

           

          below is what I have in the socket-binding section

          ================

          <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:8180}"/>

                  <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>

          ================

          • 2. Re: Wildfly 9.0.2 socket-binding problem with port in use for remote
            Tomaz Cerar Master

            Well given that original question doesn't provide the context (log) of "port already in use" it is impossible to tell what port is already in use.

            so changing just http listner port wouldn't help if port in question is different to start with.

             

            so in short, best way to run multiple wildfly instances on same machine is using port-offset instead of manually updating few socket bindings.

             

            see good blog post on this topic http://blog.arungupta.me/multiple-instances-wildfly-different-ports-same-machine-tech-tip-8/

            in short all you need to do is to add

            -Djboss.socket.binding.port-offset=10

             

            with port offset of 10, http server will be available on 8090 for example.