1 2 Previous Next 15 Replies Latest reply: May 7, 2012 4:40 AM by Wolf-Dieter Fink RSS

Jboss 6 Clustering Steps.

Nitin Sharma Newbie

Hi..

 

Any body having idea how to do clustering in jboss6.0.0 final.

Please provide step by step approch to do that.

  • 1. Re: Jboss 6 Clustering Steps.
    Wolf-Dieter Fink Master

    If you start the 'all' profile with 'run.sh -c all ...' the instance will be cluster ready.

    If you start a second one you will see a message that it join the cluster.

     

    But your application must also be prepared for clustering, i.e. with annotations or xml elements that the bean is 'clustered' or web applications marked as 'distributed'. This wil activate the specific cluster features.

     

    See Clustering FAQ's

  • 2. Re: Jboss 6 Clustering Steps.
    Nitin Sharma Newbie

    Thanks for your help but soppose I have created two instance one is all1 and second one all2, If I start both one it will give JVM_bind exception because both use same port.

    so in which file I need to change to solve this  problem.

  • 4. Re: Jboss 6 Clustering Steps.
    Nitin Sharma Newbie

    I am not able to access my application. I also made application distributed means add <distributed> tag in web.xml.

    I have started two node  node1 and node2 but  but I am not able to which url I need to use application node1 or node2 or some othere one..

    I have tryed both node1 and node2 url but I am not able to access appliation.

     

    I have used url for accessing application  for node1 http://localhsot:8080/IFMIS

    and for node to http://localhsot:8180/IFMIS because I have started this server with Port-1

     

    also suggest me where I have to put WAR file for clustering..

     

    Please help me.

     

    Thanks.

  • 5. Re: Jboss 6 Clustering Steps.
    Wolf-Dieter Fink Master

    How do you start the nodes?

    Are you able to access the JBoss welcome site localhost:8080?

  • 6. Re: Jboss 6 Clustering Steps.
    Nitin Sharma Newbie

    If I start one node I am able to access my application..

    and also welcome page by localhost:8080

     

    But If I start two second node then after I am not able to access application.

     

    I am starting node one run.bat -b 0.0.0.0 -c node1

    in such way ..

  • 7. Re: Jboss 6 Clustering Steps.
    Wolf-Dieter Fink Master

    If you have the already started and working node, what if you start the second one?

    I suppose the first is still working and the second will produce errors in the logfile.

    How do you start both nodes? and what do you changed for binding manager (you should change only the start command)

  • 8. Re: Jboss 6 Clustering Steps.
    Nitin Sharma Newbie

    I have a two machine and both machine haveing jboss6.0.0Final

    I have copy all configuration and rename node1

    1st machine IP address 102.26.134.26

    I have started node1 configuration by command promt.

    using this command  run.bat -b 0.0.0.0 -c node1 -g ClusterA -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-01

     

    2nd machine IP address 102.26.134.30

    And on 2nd machine I have rename all configuration as node2 

    I have started node2 configuration by command promt.

    using this command  run.bat -b 0.0.0.0 -c node2  -g ClusterA -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-02

     

    But I am not aware about which ip address i need to use using my application.

    And where I have to put our war file.

    In both node or need to put in single node.

     

    And suppose multiple jboss running in the network the how they identify that these node are in cluster.

     

     

     

  • 9. Re: Jboss 6 Clustering Steps.
    Wolf-Dieter Fink Master

    In your configuration the following URLs should work:

    102.26.134.26:8180

    102.26.134.30:8280

     

    The war must be copied to both server deploy directories (server/node1/deploy and server/node2/deploy)

    But if you use JBoss on different machines there is no need to set the binding.set, if you drop this property both servers run http on port 8080.

  • 10. Re: Jboss 6 Clustering Steps.
    Nitin Sharma Newbie

    These node internally manage loadbalancing  or any load balancer required for that.

    Suppose I have given to user  first node url 102.26.134.26:8180

    If this node or machine fail then how to they manage clustering.

     

    when user wite url of first node user request redirect to second node atomatically..

    bec user knows only one url..

    Its doesn't  matter how many instance running.

     

  • 11. Re: Jboss 6 Clustering Steps.
    Wolf-Dieter Fink Master

    Only EJB calls are load-balanced, these http requests are not.

    Only if you have your application marked as <distributed> the session state will be replicated that in case of failure the other node can continue.

     

    For http web clustering, i.e. loadbalancing and failover, see TomcatClustering page, already linked with the ClusteringFAQ.

    But this is another story and not my really knowledge.

  • 12. Re: Jboss 6 Clustering Steps.
    Nitin Sharma Newbie

    Hi..

    I am starting two jboss intance on saprate sapreate machine.

    I want to use two instance in a one cluster if I start node on sparate saprate machine.

     

    I am starting node one in one machine in such way

    run.bat -u 230.1.2.3 -b 0.0.0.0 -c node1 -g ClusterA -Djboss.messaging.ServerPeerID=3 -Djboss.service.binding.set=ports-01

     

    And  node2 in second machine in such way..

    run.bat -u 230.1.2.3 -b 0.0.0.0 -c node2  -g ClusterA -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-01

     

    but both node not forming cluster ,I am getting mesage only one member in cluster on each  node console.

    what mistake I am doing. Please let me know.

     

     

  • 13. Re: Jboss 6 Clustering Steps.
    Radoslav Husar Master

    but both node not forming cluster ,I am getting mesage only one member in cluster on each  node console.

    JBoss AS uses UDP multicast to discover the nodes, make sure that multicast is enabled on the network and there is no firewall that drops these messages.

  • 14. Re: Jboss 6 Clustering Steps.
    Nitin Sharma Newbie

    How to enable udp multicast on the network.

    I am using Window Vista.

1 2 Previous Next