Skip to end of metadata
Go to start of metadata

It's often useful for testing purposes to start multiple JBoss AS or EAP instances on the same box. Here's a script that starts multiple instances, each listening on a different loopback IP address (127.0.0.2, 127.0.0.3, etc.):

http://git.fedorahosted.org/cgit/rhq/rhq.git/plain/etc/scripts/jboss-as-spawn.sh

An alternative approach would be to use the JBoss AS service binding manager to start each instance with a different set of ports.

The spawn script currently does not provide a way to stop AS instances previously started via the script. Here are some commands that can be used to kill AS instances on Linux:

If you are starting more than a couple instances, you'll need to increase some OS user limits, since collectively they'll consume quite a few threads and a good chunk of memory. Here's the changes I had to make in order to start 5 EAP instances on my Fedora dev box (in addition to running RHQ, Oracle, IntelliJ, etc. on the box):

OS Tweaks

/etc/security/limits.conf

/etc/profile

Note after editing the above files, you'll need to reboot your box.

You'll also need to increase the max heap and permgen of your Agent and Server, since they will have a large number of Resources in inventory. For example, to manage 5 EAP servers, I used:

RHQ Tweaks

rhq-agent-env.sh

rhq-server.sh

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.