Monday, September 19, 2011

How to Access JBoss AS 7 on LAN network

Running JBoss AS 7 on Network

The new JBoss 7 Application server has new look and new management interface. And it has new method to start. Instead of starting the server using run.bat user now have to run it through standalone.bat 
Welcome  screen was absent in beta versions but in final version its can be accessed through
http://localhost:8080
A new refreshing look
But then a question arise in mind that if you are connected to network and how to access the server on other computers via network.
As in older versions of JBoss the same can be done using command line with -b 0.0.0.0 option using with run.bat (set broad cast address)

But in JBoss AS 7 how to do the same?
After some Googling i found following solution
open standalone.xml file in notepad (/jbosspath/standalone/configuration) and find following code chunk in it
<interfaces>
        <interface name="management">
            <inet-address value="127.0.0.1"/>
        </interface>
        <interface name="public">
           <inet-address value="127.0.0.1"/>
        </interface>
    </interfaces>

Basically find <interfaces> tag in xml file.
And add a new Interface like :

<interfaces>
        <interface name="management">
            <inet-address value="127.0.0.1"/>
        </interface>
        <interface name="public">
           <inet-address value="127.0.0.1"/>
        </interface>
         <!-- Equivalent of -b 0.0.0.0 -->

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

    </interfaces>

and then find Socket-binding-group and change default-interface value from public to any <socket-binding-group name="standard-sockets" default-interface="any">

Use IP Address of computer on which server is running to access server on network.

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I seem to be having a related issue, and this fix does not seem to work. First I did this tutorial exactly, then tried changing the value attribute from binding to 127.0.0.1 to binding to 0.0.0.0 and still I get a gateway timeout trying to reach port 9990. The server itself is able to be accessed since I can reach the PHP pages I have at port 80, but for some reason I cannot reach JBoss. Any suggestions? I've also tried -b 0.0.0.0 and using the and tags

    ReplyDelete

Leave your comment here....