JBoss WildFly: Starts but can’t connect?

By default jboss/wildfly binding to localhost, if you want change this, you can execute:

standalone.sh -b 0.0.0.0

listen on all IP addresses of the machine (if multihomed)

Another alternative is configure in standalone.xml the interfaces section.

Change:

<interfaces>
  <interface name="management">
   <inet-address value="127.0.0.1"/>
  </interface>
  <interface name="public">
   <inet-address value="127.0.0.1"/>
  </interface>
</interfaces>

to:

<interfaces>
  <interface name="management">
   <!-- Use the IPv4 wildcard address -->
   <any-ipv4-address/>
  </interface>
  <interface name="public">
   <!-- Use the IPv4 wildcard address -->
   <any-ipv4-address/>
  </interface>
</interfaces>

Ref:

  • WildFly – Interfaces and ports
  • WildFly – Command line parameters

UPDATE

From Wildfly 8 <any-ipv4-address/> was deprecated and remove in Wildfly 9, then if you are in 9.x or higher use <any-address/>.

Deprecated. In the absence of -Djava.net.preferIPv4Stack=true, the
JVM cannot be instructed to bind a socket to all IPv4 addresses, but
only to IPv4 addresses, so the intended semantic cannot be obtained
via this setting alone. Since using any-addressType and setting
-Djava.net.preferIPv4Stack=true provides the same effect, this
any-ipv4-addressType will be removed in a future release.

Eg:

<interface name="global">
   <!-- Use the wildcard address -->
   <any-address/>
</interface>

Leave a Comment