Following are the steps i follow to setup cluster in 3 different machine.
1. Unzip JBoss fuse in three different folders, so that you have the following configuration:
- machine1/jboss-fuse-6.3.0.redhat-187
- machine2/jboss-fuse-6.3.0.redhat-187
- machine3/jboss-fuse-6.3.0.redhat-187
2. Edit etc/org.apache.karaf.management.cfg
and change rmiRegistryPort
, rmiServerPort
, assiging an unique port:
**#machine1**
rmiRegistryPort = 1099
rmiServerPort = 44444
**#machine2**
rmiRegistryPort = 1100
rmiServerPort = 44445
**#machine3**
rmiRegistryPort = 1101
rmiServerPort = 44446
3. Edit etc/org.apache.karaf.shell.cfg
and change sshPort
, assiging an unique port:
#machine1
sshPort = 8101
#machine2
sshPort = 8102
#machine3
sshPort = 8103
4. Edit etc/system.properties. Change karaf.name, org.osgi.service.http.port, activemq.port , assiging an unique port:
#machine1
karaf.name = root1
org.osgi.service.http.port=8181
activemq.port = 61616
#machine2
karaf.name = root2
org.osgi.service.http.port=8182
activemq.port = 61617
#machine3
karaf.name = root3
org.osgi.service.http.port=8183
activemq.port = 61618
5. start the root1 Container
./fuse
6. And create the Fabric:
JBossFuse:karaf@root1> fabric:create --new-user administrator --new-user-password password --new-user-role Administrator --zookeeper-password ZooPass1 --resolver manualip --manual-ip 192.168.1.9 --wait-for-provisioning
Above is My root1 machine1 IP Address : 192.168.1.9
7. Now, start the root2 Container and join the Fabric:
./fuse
JBossFuse:karaf@root2> fabric:join 192.168.1.10:2181
Ensemble password: ZooPass1
8. Now, start the root3 Container and join the Fabric:
./fuse
JBossFuse:karaf@root3> fabric:join 192.168.1.11:2181
Ensemble password: ZooPass1
9. Run the following command to ensemble:
JBossFuse:karaf@root1> fabric:ensemble-add root2 root3
This will change of the zookeeper connection string.
Are you sure want to proceed(yes/no):yes
JBossFuse:karaf@root1> fabric:ensemble-list
[id]
root1
root2
root3
Then, i deployed the rest service on all 3 nodes and create the profile also added require profile with HTTP GETEWAY for load balancer and HA
but request is not gone throgh machine 2 and machine 3. Even i am also not able access machine 1 and machine 2 hawtio console as per give below URL.
192.168.1.10:8182/hawtio/login
192.168.1.10:8183/hawtio/login
Can anybody help to to achieve load balancing for cluster environment with 3 different machine?
I would suggest -- don't do any of this :) If you're using Fabric8, install one instance of Fuse, do fabric:create
, then use container-create-ssh --host localhost
to set up other containers on the same machine. That will automatically take care of all the port conflicts that I suspect are at the root of your problem. Fabric8 uses many, many ports, and trying to fix them all up manually is a ghastly job.