10 Replies Latest reply on Oct 10, 2005 10:52 AM by jerrygauth

    JBoss4.0.1 Clustering

    sajididris

      Hi
      I am trying to cluster the Jboss4.0.1 server for my project to run more instance, I copied the cluster-service.xml and placed it in \server\default\deploy. But i am getting the following error while i start the server...

      Incompletely deployed packages:
      org.jboss.deployment.DeploymentInfo@e463b342 { url=file:/D:/jboss-4.0.1/server/default/deploy/cluster-service.xml }
      deployer: org.jboss.deployment.SARDeployer@1e845c2
      status: Deployment FAILED reason: No ClassLoaders found for: org.jboss.ha.framework.server.ClusterPartition; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.ha.framework.server.ClusterPartition)
      state: FAILED
      watch: file:/D:/jboss-4.0.1/server/default/deploy/cluster-service.xml
      altDD: null
      lastDeployed: 1127888662672
      lastModified: 1127888662657
      mbeans:

      I have also gone through the JBoss Clustering docs from Jboss.org website, but unable to fix it.

      Can anybody please give me correct step to do JBoss Clustering.

      Regards
      Sajid

        • 1. Re: JBoss4.0.1 Clustering

          You'l need to run multiple copies of your server, using different node names such as node1 and node2. Copy the 'all' server configuration to to create the new servers. You can then start a server using "run.bat -c node1"

          You'll also need to vary the port addresses of the second server if you're running on a single machine. This can be accomplished either through the use of multiple IP addresses on your machine (e.g., wired and wireless IP addresses) or via the JBossBindingManager. If you use multiple IP addresses, use "run -c YourNode -b YourIP" to specify the IP address of the server. If you use a single IP address, use the JBossBindingManager as described in JBoss online documentation.

          If you want loadbalancing and failover, you'll need loadbalancing software such as Apache mod_jk. The JBossAS Clustering Guide available online describes how to install, configure and use this software.

          Jerry

          • 2. Re: JBoss4.0.1 Clustering
            sajididris

            Hi,
            I am able to run two copies of the server on my m/c, but when i run my application it runs fine on using localhost:8080, but its not identifying with my machine name. I am connecting Jboss with Apache, its working fine with machine name when i deploy the application in default. But its not able to connect to Apache when the application is deployed on different node. Please advise.

            • 3. Re: JBoss4.0.1 Clustering

              Are you sure you've configured mod_jk correctly with JBoss? You can check the wiki page for guidance at http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss

              If you've configured everything correctly, your application will be accessible on whatever port you've specified for Apache. So if node1 uses port 8080, node2 uses port 8180, and Apache uses port 8000, your application will be accessible at http:/<your_server>:8000/<your_app>.

              • 4. Re: JBoss4.0.1 Clustering
                sajididris

                Jerry,

                I am able to run two instances on different port, I am testing fail-over. I open an application on the browser and stoping one server instance and trying to continue accesing the application, i feel the other server should take over my application, but it is not happening so. E.g. - I m running my application on 8080, and my 2 instances are on 8080 & 8180, when i stop 8080 instance, the 8180 should keep the server running, but its giving me error. Please advise.

                Sajid

                • 5. Re: JBoss4.0.1 Clustering
                  darranl

                  Can you provide the configuration you have performed with Apache and mod_jk

                  • 6. Re: JBoss4.0.1 Clustering

                    Are you sure you've configured Apache correctly? If Apache is running on port 8080, how can one of your nodes be running on 8080 on the same machine? Are you using multiple IP addresses?

                    • 7. Re: JBoss4.0.1 Clustering
                      sajididris

                      Jerry,
                      I am not running my application on Apache, right now i am only running two instance of Jboss, one on 8080 and other on 8180. I run the application at 8080 and then i am shutting down the 8080 instance, after that the application should be taken care by 8180, but its not happening. Please suggest.

                      • 8. Re: JBoss4.0.1 Clustering
                        darranl

                        If you want failover you will need a load balancer.

                        Apache with mod_jk is good for this. Web browsers do not support faiover themselves.

                        • 9. Re: JBoss4.0.1 Clustering
                          sajididris

                          Hi Darran,
                          I have configured mod_jk with Apache and Jboss, i am running two instance of Jboss on 8080 & 8180 and Apache is running on port 80, my application is running right, but its unable to perform failover, when i stop one instance of Jboss, the other started instance should take over the running application and keep it running, but its not happening like that. I have followed this link to set mod_jk
                          http://wiki.jboss.org/wiki/Wiki.jsp?
                          page=UsingMod_jk1.2WithJBoss

                          please advise and give me correct step

                          • 10. Re: JBoss4.0.1 Clustering

                            Are you directing your requests to the Apache server (i.e., port 80)?

                            Are the application requests being load balanced to the two servers or is everything being forwarded to one of the servers? If you use the configuration provided on the wiki page, you should have failover and load balancing enabled.

                            If you only start the server on port 8180, do your requests get handled by it?