How to Enable JBoss AS 7 to Accept Remote Connections

by Ramesh Natarajan on February 12, 2014

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


Linux Sysadmin Course Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.
Get the Linux Sysadmin Course Now!

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

{ 4 comments… read them below or add one }

1 Kapil February 12, 2014 at 11:04 pm

Good work sir.

2 Bob February 13, 2014 at 9:13 am

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

3 Rogério Costa February 14, 2014 at 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.

4 Ramesh O November 19, 2014 at 6:45 am

it was really nice artical and helpfull.

Leave a Comment

Previous post:

Next post: