Reputation: 304
I need to test some cluster oriented developments. Unfortunately I have just my laptop and no other PCs at hand. I there a concrete way to setup a jBoss 6 cluster within my laptop with a single IP address? Thanks in advance for the help.
Upvotes: 0
Views: 781
Reputation: 249
This article explains how to setup a Torquebox (specialized JBoss to jruby) cluster in one machine and has info on how to create the virtual ips. Hope it helps.
Upvotes: 0
Reputation: 1462
The only problem with running two JBoss servers on one IP address is that they are set to bind to the same ports. So there are two ways how to resolve this problem.
1: Just say JBoss server to use another set of ports. You can set it when starting server.
./run.sh -Djboss.service.binding.set=ports-01
It means that all ports will be higher by 100, so for example admin console won't be on port 8080 but on 8180. Default value is ports-default and others are ports-01, ports-02 etc.
2: The second possibility is to create another virtual IP address, and bind servers to different addresses.
./run.sh -b 192.168.1.2
./run.sh -b 192.168.1.3
Also don't forget to set properly jboss.messaging.ServerPeerID parameter. So commands it will be:
./run.sh -Djboss.messaging.ServerPeerID=1
./run.sh -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=2
or
./run.sh -b 192.168.1.2 -Djboss.messaging.ServerPeerID=1
./run.sh -b 192.168.1.3 -Djboss.messaging.ServerPeerID=2
In the same way you can configure JBoss AS5, but JBoss AS7 configuration is completely different.
Upvotes: 1
Reputation: 47945
I wrost case you have to use a virtual pc like VirtualBox or VMware.
Upvotes: 0