0

I need the binding offset to be 10200 so I added this option:

-Djboss.socket.binding.port-offset=10200 -Djboss.http.port=7011 -Djboss.https.port=7010

But HTTP port became 17211.

I need HTTP port to be 7011 and there is no way to subtract the offset 10200 from 7011. How can I do this?

SwiftMango
  • 15,092
  • 13
  • 71
  • 136

1 Answers1

1

Unfortunately there is currently no way to do what you want entirely in Wildfly.

If you'll look in the default config, the port-offset is controlled at the socket-binding-group. It will increment every port in the group.

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

And if you look in the XSD for the configuration you will see that the config only allows one socket-binding-group:

<xs:element name="socket-binding-group" type="standalone-socket-binding-groupType" minOccurs="0" maxOccurs="1"/>

Can I ask why you wouldn't want http to increment? If you are running multiple instances of WF on a server you always want all ports to increment. If you are only running one instance, you can configure all the ports directly in standalone.xml like this:

<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="7011"/>
    <socket-binding name="https" port="7010"/>
    <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>

Then just leave the port offset at 0 and you are good.

Tea Curran
  • 2,923
  • 2
  • 18
  • 22