11 Replies Latest reply on Jun 21, 2012 9:49 PM by montia

    Jboss AS 7| Clustering steps

    Rajesh Thakur Newbie

      Hello Guys,

       

      Could you please walk me through the steps to configure jboss clustering in Jboss AS7.

       

      i am not getting the appropriate steps to do so , will indeed appriciate if some one please help me out on this.

       

      Thanks,

      Rajesh

        • 1. Re: Jboss AS 7| Clustering steps
          Rajesh Thakur Newbie

          is any configuration to be done on apache or inside jboss configuration itself somewhere???

           

          Please assist on this.

          • 2. Re: Jboss AS 7| Clustering steps
            Paul Ferraro Master

            Starting JBoss using one of the HA profiles (e.g. ./bin/standalone.sh --server-config=standalone-ha.xml)  is all that is required to enable clustering functionality.  If you need to replicate server-side user state to support failover, this needs to be enabled per application (e.g. adding <distributable/> to web.xml, or @Clustered to your session EJBs).  As for what to do next depends on what exactly you're trying to do.  You mention apache, which implies that you're trying to do load balancing?  Assuming that is the case, what load balancing module are you using in Apache httpd?

            • 3. Re: Jboss AS 7| Clustering steps
              Rajesh Thakur Newbie

              Hello Paul,

               

              Thanks lot for your quick turaround!

               

              Let me walk you through my requirements, as i am quite new to jboss clustering so please , i  have configured vweblogic clustering in my env.

               

              my Concerns:

               

              1. What is the configuration required to setup horizontal cluster , means i have two jboss servers running on different machine now configuration that is required to configure them in cluster as we do in weblogic.

               

              2. How can i check the that my clusering is routing the request in expected manner.

               

              3. Is anything is required to configure on apache level for this or we just have to do configuration changes on jboss itself, if apache changes are required will be great if you could please get me the steps.

               

              4. how can i setup ssl if i have two jboss servers in LB/clustering acrros two different servers.

               

              And i am having mod_proxy with my httpd, like weblogic we dont have to do anything related to clustering in apache ..for jboss  clustering what are the steps please

               

              Thanks,

              Rajesh

              • 4. Re: Jboss AS 7| Clustering steps
                Paul Ferraro Master

                1. So long as your network supports UDP multicast, your nodes should cluster successfully using the default HA settings.

                2. You can verify that web requests are routing as expected by looking at the httpd access log.

                3. Using mod_proxy_balancer, you will need to enumerate the balancer members.

                http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html

                4. http://httpd.apache.org/docs/2.0/mod/mod_ssl.html

                To use mod_proxy, you will need to define a unique instance-id in the web subsystem:

                e.g.

                 

                {code:xml}<subsystem xmlns="urn:jboss:domain:web:1.1" instance-id="...">

                ...

                </subsystem>

                {code}

                 

                So long as mod_proxy knows about all of your cluster nodes, and each cluster node has a unique identifier, everything should just work.

                • 5. Re: Jboss AS 7| Clustering steps
                  Rajesh Thakur Newbie

                  Thanks Paul.

                   

                  i am sorry still i have questions to ask:

                   

                  1. What are the configuration steps on jboss level for having two jboss instances on 2 different machins ?

                  2. steps to confgigure the cluster with apache , with mod_cluser module

                  3. Can clustering feature be enable in (standalone.sh mode) , if yes then what is the requirement to run jboss in domain.sh mode.

                   

                  will indeed appriciate if you could please explain me the steps for jboss configuration like any config files and all..?

                   

                  Thanks

                  Rajesh

                  • 6. Re: Jboss AS 7| Clustering steps
                    Paul Ferraro Master

                    1. I think I answered this already.  All you need to do is define a unique instance-id in the web subsystem.  If you are using mod_cluster, you don't even have to do that - since mod_cluster can auto-generate the instance-id.

                    2. The ha profiles are pre-configured to work with mod_cluster out-of-the-box.  To configure httpd w/mod_cluster, see:

                    http://docs.jboss.org/mod_cluster/1.2.0/html/native.config.html

                    3. Yes - standalone vs domain only controls how servers are managed.  To start a standalone server w/clustering support, start the server with an "ha" configuration, e.g. ./bin/standalone.sh --server-config=standalone-ha.xml.  To run JBoss in domain-mode w/clustering enabled, edit host.xml and configure the servers in your server-group (N.B. typically, a server-group (i.e. a set of servers that use the same configuration) will correspond to a cluster) to use an "ha" profile.

                    • 7. Re: Jboss AS 7| Clustering steps
                      Rajesh Thakur Newbie

                      Thanks, let me try will let you know..

                      • 8. Re: Jboss AS 7| Clustering steps
                        Rajesh Thakur Newbie

                        Hello Paul,

                         

                        Sorry to pester you...again on this.

                         

                        now can you please help me, how can i :

                         

                        1. Setup JVM for its best performance.

                        2. Which are the configuration files i should edit to achieve JVM tunning in JBOss 7.1

                        3. Performance tunning in JBOSS

                        4. And the ways of integration jboss with apache.

                         

                        Helpp will be indeed appriciated.

                         

                        Thanks,

                        Rajesh

                        • 9. Re: Jboss AS 7| Clustering steps
                          Radoslav Husar Master

                          1. Setup JVM for its best performance.

                          2. Which are the configuration files i should edit to achieve JVM tunning in JBOss 7.1

                          3. Performance tunning in JBOSS

                          AFAIK We dont have a guide as of now but it varies from application to application, so there is not one cure-it-all advice anyway. The AS ships with mostly tuned configurations already.

                           

                          4. And the ways of integration jboss with apache.

                          Use mod_cluster! http://www.jboss.org/mod_cluster/

                          • 10. Re: Jboss AS 7| Clustering steps
                            montia Newbie

                            Hi Radoslav,

                             

                            I am using mod_cluster (mod_cluster-1.2.0.Final-windows-x64-ssl.zip) and JBoss AS 7.1.1 (jboss-as-7.1.1.Final) on the same server (Windows Server 2008 R2 Standard).

                             

                            After more than a week of searches and trying various things out, I managed to get this configured so that requests on port 80 for two name-based virtual hosts (http://site1.com and http://site2.com) go to a web application running on JBoss on port 8080.

                             

                            I have also created a self-signed server.keystore file using keytool and enabled SLL in JBoss so now I can access my web application locally by going to https://localhost:8443/myapp.

                             

                            I want to have requests for https://site1.com and https://site2.com on port 443 go to my JBoss application on port 8443.

                             

                            I have tried loading the mod_ssl.so module in my httpd.conf, but I got the following error:

                            httpd: Syntax error on line 114 of C:/httpd-2.2/conf/httpd.conf: Cannot load C:/httpd-2.2/modules/mod_ssl.so into server: The specified module could not be found.

                             

                            This syntax error was caused by uncommenting the following line in httpd.conf:

                            LoadModule ssl_module modules/mod_ssl.so

                             

                            I checked and there is a mod_ssl.so file in C:/httpd-2.2/modules.

                             

                            However, based on my research of various threads on this forum and Apache HTTP and JBoss documentation, I'm not even sure that using mod_ssl is what I need so that requests for https://site1.com and https://site2.com on port 443 go to my JBoss application on port 8443.

                             

                            Are there any guidelines on how to accomplish this?

                             

                            Thank you,

                            Monica

                            • 11. Re: Jboss AS 7| Clustering steps
                              montia Newbie

                              For a solution to the mod_ssl.so syntax error reported above see https://community.jboss.org/thread/200654.