5

I am running JBoss AS 7 on port 8080. I am able to access it from my local machine (http://localhost:8080). However I am not able to access it from another machine on the same network, e.g. http://192.168.1.104:8080 does not work. I have disabled the Windows firewall on the local machine. In fact, if I start a Tomacat server on the local machine at port 8080 it is easily accessible from a remote machine. So it is something about the JBoss server that is causing the problem. Any idea on how to fix this?

Thanks.

Naresh
  • 23,937
  • 33
  • 132
  • 204

4 Answers4

11

If you are running JBoss from an IDE there should be a checkbox that allows for remote web access. It is unchecked by default. In eclipse, double click on JBoss under the servers tab and there should be a checkbox labeled "Listen on all interfaces to allow remote web connections." under the Server Behaviour tab.

AhmedAly
  • 156
  • 1
  • 5
10

Start the server with -Djboss.bind.address=192.168.1.104 option

OR

add the server IP address in your standalone.xml

<interfaces>
  <interface name="management">
    <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
  </interface>
  <interface name="public">
    <inet-address value="${jboss.bind.address:192.168.1.104}"/>
  </interface>
</interfaces>

You can use 0.0.0.0 instead of 192.168.1.104 if you want to bind to all IP addresses.

Alf
  • 2,291
  • 1
  • 28
  • 34
3

You can use this:

<interface name="public">
    <any-address/>
</interface>

It is necessary to restart server after adding this.

stakahop
  • 921
  • 9
  • 18
2

If you are strating your server by executing run.bat, you should execure this command run.bat -b 0.0.0.0 (refer to https://community.jboss.org/wiki/JBoss42FAQ) If you start your server from eclipse, just tick the option (Listen on all interfaces to allow remote web connections) on the server behavior.

Nejmeddine
  • 23
  • 4