≡ Menu

How to Enable JBoss AS 7 to Accept Remote Connections

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.

JBoss Interfaces
Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Comments on this entry are closed.

  • Kapil February 12, 2014, 11:04 pm

    Good work sir.

  • Bob February 13, 2014, 9:13 am

    Good article. Might be useful to give a 1 or 2 line description of what JBOS is

  • Rogério Costa February 14, 2014, 3:28 am

    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.

  • Ramesh O November 19, 2014, 6:45 am

    it was really nice artical and helpfull.

  • Anjaneyulu March 3, 2017, 12:00 am

    Really it helps a lot.