I read the following: https://developer.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOnemachine
In summary it says you cannot have two daemons listening on the same IP address and same port for incoming requests. To address this issue you have two choices:
1. Bind each JBoss AS instance to a different IP address
2. Ensure each instance is using a distinct port for each service. This can be done using the Service Binding Manager.
So, I believe I should be able to run the following:
./run.sh -c node1 -b 123.456 -g cluster1 --> starts the first cluster running on port 5000
./run.sh -c node2 -b 123.456 -g cluster2 -Djboss.service.binding.set=ports-01 --> starts second cluster on port 5100
Has anyone done anything similar and got it to work or hit any issues that I should be aware of?
Any help appreciated.
With different IP addresses (i.e. if youhave more nic's with your box) or using the binding manager you are able to run more instances on one physical or VM box
But you need to consider that you need more CPU power and memory then, it doesn't make sense to have two instances which overload the box
Thanks for the reply. I appreciate what you say and I have taken these things into account, we have sufficient resources.
I am looking for answers to what I actually need to reconfigure to make this happen. Obviously there will be potentially a conflict of ports, I understand typically the Service.Bindng.Manager will take care of this but because I'm using tcp protocol (-Djboss.default.jgroups.stack=tcp) does this mean, for example, I need to edit the jboss-channelfactory-jboss-beans.xml file?
The tcp protocol shows start_port=7600 for cluster 1, will this need changing for cluster 2 along with the TCPPING initial_hosts parameter?
The port is changed for the second instance.
So you need to specify the initial_host parameter different for each cluster and not mix the members of the different clusters