By Default, when you install and configure JBoss AS 7, the management port 8080 can be accessed only by launching a browser from the system where you’ve installed the Jboss, and going to http://localhost:8080 or http://127.0.0.1:8080
When you connect to the Jboss AS 7 from a remote machine, using the ip-address, it will not work. i.e http://{ip-address}:8080 will not work.
To solve this problem, follow any one of the methods mentioned in this article to enable remote connections to the Jboss AS 7 server.
In these example, let us assume that the ip-address where the JBoss server is running is 192.168.101.1
Method 1: Modify the standalone.xml file
Modify the $JBOSS_HOME/standalone/configuration/standalone.xml file and change the 127.0.0.1 to to the ip-address that you like.
Before:
<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:127.0.0.1}"/> </interface>
After:
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:192.168.101.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:192.168.101.1}"/> </interface>
Or, you can just allow any IPv4 using <any-ipv4-address/> as shown below to specify the ip-address.
<interfaces> <interface name="management"> <any-ipv4-address/> </interface> <interface name="public"> <any-ipv4-address/> </interface>
Restart the JBoss AS after the above change.
Method 2: Use standlone.sh -b Option
While staring the Jboss AS 7, you can use the -b option as shown below.
$JBOSS_HOME/bin/standalone.sh -b 192.168.101.1
Any one of the following format will work:
$JBOSS_HOME/bin/standalone.sh -b 192.168.101.1 $JBOSS_HOME/bin/standalone.sh -b=192.168.101.1 $JBOSS_HOME/bin/standalone.sh -b127.0.0.1=192.168.101.1
Method 3: Change it from UI
From the server console, launch the Jboss GUI from http://127.0.0.1:8080, and click on “Profile” -> General Configuration -> Interfaces.
From here, you can change the ip-address of the management and public interfaces. Restart the JBoss AS after this change.
Comments on this entry are closed.
Good work sir.
Good article. Might be useful to give a 1 or 2 line description of what JBOS is
Well done!
I work everyday with jBoss and it is more practical to use the option “-b” for development purposes. In quality and real environment we use an ajp connection.
it was really nice artical and helpfull.
Really it helps a lot.