Jboss as 7 – running multiple instances in the same linux server – standalone vs domain

configurationinstallationjbossjboss7.x

  1. I downloaded the jboss tar file.
  2. Copied into my test server.
  3. Did untar and installed it at $HOME/jboss/

Now, I need to have three instances running at the same time – Dev, QA, UAT – on a SINGLE server.

Is the Domain mode for this situation?
My conclusion was that it is not. That Domain mode is to manage JVMs across multiple servers.
For example, if I wanted QA to be in server1 and server2.
Is that correct?

However, my need is NOT to manage JBOSS instances across multiple servers.

Given that should I be using standalone mode?
If so, how would I run three instances of JBOSS (Dev, QA and UAT) concurrently.

I tried the instructions given here (Approach 2) : https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine

But I keep getting the errors like this:

MSC00001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: Address already in use /127.0.0.1:9990

Is there any simple tutorial that I can follow.
I see this questions asked multiple times, but none of them seem to have a satisfactory answer…. that I find helpful. Is this a black art that lowly developers should not attempt in their home alone?

SGB

Best Answer

To get multiple jboss instances running on linux, in JBOSS_HOME/standalone/configuration/standalone.xml, I changed a single line from :

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

to the following...

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:100}">

NOTE: The reason I was having problem was because I had setup my JBOSS_HOME in my .bash_profile as per the jboss installation instructions. I needed to remove this so that both instances would not use the same JBOSS_HOME.