Reputation: 6059
How can i set-up
multiple nodes of WildFly in a single machine in Clustered mode ?
Should i create multiple Standalone nodes or multiple Domain nodes if I want to create all these multiple nodes in my 1 machine ?
Reason i want to have all nodes in 1 machine is because currently I am learning & validating few of it's capabilities.
Note: I referred to this http://middlewaremagic.com/jboss/?p=1952 but, i keep getting the following error
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.network.public: org.jboss.msc.service.StartException in service jboss.network.public: JBAS015810: failed to resolve interface public
at org.jboss.as.server.services.net.NetworkInterfaceService.start(NetworkInterfaceService.java:96) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
Updated understanding on Standalone vs Domain: The HA or Failover feature provided by the multiple nodes in a cluster is the same between Standalone or Domain mode. The difference is that, in Domain mode, it allows the admins to manage/deploy all the nodes via a single (domain controler) node's Admin Console. This URL has a good explanation on it
Ref: https://docs.jboss.org/author/display/WFLY8/Admin+Guide#AdminGuide-
Update: As of now for learning purpose, i have configured to run multiple nodes in my machine using Domain mode blog.arungupta.me/wildfly-8-clustering-and-session-failover
Upvotes: 4
Views: 6094
Reputation: 1792
Try to execute two or more instances on the same machine using a HA profile, choose the standalone-ha.xml. For example, on the same machine:
%WILDFLY_HOME_1%/standalone.bat -c standalone-ha.xml -Djboss.node.name=srv1;
and
%WILDFLY_HOME_2%/standalone.bat -c standalone-ha.xml -Djboss.node.name=srv2 -Djboss.socket.binding.port-offset=100
and you'll have a cluster of two nodes on the same machine, the first one bound to port 8080
and the second one bound to port 8180
. There is no need configuring a domain to have a cluster.
Upvotes: 6