I just configured JBoss WildFly. It is running and it is accessible from the same machine, everything is working fine...
My problem is that it is not accessible from another system (I mean in a network, the server (hosted machine) URL can't access from another system).
How can I solve this?
JBoss EAP is just a commercial build of the Wildfly project. In many ways, especially from a source code perspective, JBoss and Wildfly are the same thing. “Wildfly is the upstream project JBoss EAP is built on,” said James Falkner, technical product manager for Red Hat Runtimes.
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:
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 usingany-addressType
and setting-Djava.net.preferIPv4Stack=true
provides the same effect, thisany-ipv4-addressType
will be removed in a future release.
Eg:
<interface name="global">
<!-- Use the wildcard address -->
<any-address/>
</interface>
The <any-ipv4-address/>
is deprecated in WF 9, use:
...
<interface name="management">
<any-address/>
</interface>
...
(I summary 2 answers for a working solution)
I am using WildFly 10.0.0.Final - lastest version at writing time. Look for file standalone.xml
like this:
On Windows
C:\tools\wildfly-10.0.0.Final\standalone\configuration\standalone.xml
Or Linux, like this:
/home/vyhn.net/wildfly-servlet-10.0.0.Final/standalone/configuration/standalone.xml
edit become to:
<interfaces>
<interface name="management">
<!-- Allow all external IP -->
<any-address/>
</interface>
<interface name="public">
<!-- Allow all external IP -->
<any-address/>
</interface>
</interfaces>
Then go to:
http://your_domain:9990/error/index.html
(port 9990
is default HTTP port, if you use firewall or iptables, remember open port 9990
)
For example:
http://vyhn.net:9990/error/index.html
You will see it works successful.
Lastest reference (WildFly 10): https://docs.jboss.org/author/display/WFLY10/Interfaces+and+ports
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With