11 Replies Latest reply on Feb 22, 2012 8:29 AM by Joseph Fouts

    Clustering question.

    Joseph Fouts Novice

      Server #1

      Changed standalone-ha.xml  -- Changed IP Address to machine's IP address

       

      <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:10.100.100.12}"/>

              </interface>

              <interface name="public">

                  <inet-address value="${jboss.bind.address:10.100.100.12}"/>

              </interface>

          </interfaces>

       

      Start server #1

       

      The only message I see in the server log that says anything about a cluster is the following:

       

      14:39:10,267 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Started FileSystemDeploymentService for directory C:\apps\jboss-as-7.1.0.Final\standalone\deployments

      14:39:14,978 INFO  [org.jboss.as.modcluster] (MSC service thread 1-5) JBAS011704: Mod_cluster uses default load balancer provider

      14:39:14,995 INFO  [org.jboss.modcluster.ModClusterService] (MSC service thread 1-5) Initializing mod_cluster 1.2.0.Final

      14:39:15,002 INFO  [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (MSC service thread 1-5) Listening to proxy advertisements on 224.0.1.105:23364

       

       

      Server #2

      Changed standalone-ha.xml  -- Changed IP Address to machine's IP address

       

      <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:10.100.100.2}"/>

              </interface>

              <interface name="public">

                  <inet-address value="${jboss.bind.address:10.100.100.2}"/>

              </interface>

          </interfaces>

       

      Start server #2

       

      I see the exact log message on the console about the cluster as in server #1.

       

      In jboss 5.1 I would see messages that there were 2 machines now on the cluster.

      How to I verify the cluster in jboss 7?

      Can I check the cosole or CLI?

       

      How do I know that the cluster of the two servers were established?

       

      Also how  do I do a lookup and envocation of a SLSB from another SLSB from within the cluster?  Been looking for this for a few days now.

      Was working in 5.1 now can't seem to figure it out in jboss7.  Not even sure if its even supported yet. 

      I can't seem to get a straight answer. 

      Can someone please help?

       

      Thanks.

        • 1. Re: Clustering question.
          Radoslav Husar Master

          Hi there!

          How to I verify the cluster in jboss 7?

           

          Well, you need to deploy something that will actually start the cluster. So deploy a distributable app and you will see the following logging just like you would see in AS5:

           

          13:20:32,922 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016002: Processing weld deployment clusterbench-ee6-web.war

          13:20:32,945 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: clusterbench-ee6.ear

          13:20:33,122 INFO  [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.5 (AS71)

          13:20:33,184 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016008: Starting weld service for deployment clusterbench-ee6.ear

          13:20:34,055 INFO  [stdout] (pool-19-thread-1)

          13:20:34,055 INFO  [stdout] (pool-19-thread-1) -------------------------------------------------------------------

          13:20:34,056 INFO  [stdout] (pool-19-thread-1) GMS: address=rhusar/ejb, cluster=ejb, physical address=127.0.0.1:55200

          13:20:34,056 INFO  [stdout] (pool-19-thread-1) -------------------------------------------------------------------

          13:20:34,091 INFO  [stdout] (pool-14-thread-1)

          13:20:34,092 INFO  [stdout] (pool-14-thread-1) -------------------------------------------------------------------

          13:20:34,092 INFO  [stdout] (pool-14-thread-1) GMS: address=rhusar/web, cluster=web, physical address=127.0.0.1:55200

          13:20:34,093 INFO  [stdout] (pool-14-thread-1) -------------------------------------------------------------------

          13:20:36,101 INFO  [org.jboss.as.clustering.impl.CoreGroupCommunicationService.ejb] (MSC service thread 1-4) JBAS010206: Number of cluster members: 1

          13:20:36,109 INFO  [org.jboss.as.clustering.impl.CoreGroupCommunicationService.web] (MSC service thread 1-2) JBAS010206: Number of cluster members: 1

           

          Can I check the cosole or CLI?

          Is the log enough? The console doesnt currently have the clustering section, it is coming in 7.1.1 release (so, soon!).

           

          HTH

          Rado

          • 2. Re: Clustering question.
            Joseph Fouts Novice

            I'm not a web guy so I'm not familar with.war and .ear files so bare with me.

             

            If my jar file has a stateless session bean that can be called from a remote client or a remote bean(can i even get this to work) does that not count as a distributable app?

             

            This seems like pretty simple stuff and it should not be this difficult to get working. 

            What am I missing?

             

            Thanks.

            • 3. Re: Clustering question.
              Radoslav Husar Master

              If my jar file has a stateless session bean that can be called from a remote client or a remote bean(can i even get this to work) does that not count as a distributable app?

              Your web.xml should contain <distributable/> tag in it.

              • 4. Re: Clustering question.
                Joseph Fouts Novice

                Thanks for your help Rado but I'm still confused.

                 

                Why would I need a web.xml file when my app is not a web app?  Seems kind of odd.

                 

                Again not be a web app guy where does this file go?

                 

                My jar file structure looks like this:

                 

                com

                   main

                       mySLSB

                META-INF

                   MANIFEST.MF

                --web.xml

                 

                I created an web.xml and placed it into the META-INF folder

                Is this the correct format?

                 

                <?xml version="1.0" encoding="ISO-8859-1"?>

                <web-app>

                    <distributable/>

                </web-app>

                 

                After build/deploy the log still does not display anything about clustering.

                 

                08:48:12,295 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 52) JBAS015537: Activating WebServices Extension

                08:48:12,303 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 43) JBAS011940: Activating OSGi Subsystem

                08:48:12,329 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 37) JBAS010260: Activating JGroups subsystem.

                08:48:12,332 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 33) JBAS010280: Activating Infinispan subsystem.

                08:48:12,356 INFO  [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.7.Final)

                08:48:12,365 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 42) JBAS011800: Activating Naming Subsystem

                08:48:12,379 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 48) JBAS013101: Activating Security Subsystem

                08:48:12,433 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.6.final

                08:48:12,440 INFO  [org.jboss.as.naming] (MSC service thread 1-6) JBAS011802: Starting Naming Service

                08:48:12,551 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-8) JBAS015400: Bound mail session [java:jboss/mail/Default]

                08:48:12,603 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-6) JBoss Web Services - Stack CXF Server 4.0.1.GA

                08:48:12,631 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 29) JBAS010403: Deploying JDBC-compliant driver class com.ibm.db2.jcc.DB2Driver (version 2.11)

                08:48:12,723 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 33) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

                08:48:12,744 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 33) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

                08:48:12,744 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) Starting Coyote HTTP/1.1 on http--10.100.100.12-8080

                08:48:12,772 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory c:\apps\jboss-as-7.1.0.Final\standalone\deployments

                08:48:12,777 INFO  [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on /10.100.100.12:9999

                08:48:12,777 INFO  [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on /10.100.100.12:4447

                08:48:12,824 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:/admindatasource]

                08:48:17,662 INFO  [org.jboss.as.modcluster] (MSC service thread 1-4) JBAS011704: Mod_cluster uses default load balancer provider

                08:48:17,678 INFO  [org.jboss.modcluster.ModClusterService] (MSC service thread 1-4) Initializing mod_cluster 1.2.0.Final

                08:48:17,685 INFO  [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (MSC service thread 1-4) Listening to proxy advertisements on 224.0.1.105:23364

                08:48:17,721 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "LIDP-ADMI2.jar"

                08:48:18,287 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named TestBean2 in deployment unit deployment "LIDP-ADMI2.jar" are as follows:

                 

                    java:global/LIDP-ADMI2/TestBean2!com.lidp.main.TestBeanRemoteInf

                    java:app/LIDP-ADMI2/TestBean2!com.lidp.main.TestBeanRemoteInf

                    java:module/TestBean2!com.lidp.main.TestBeanRemoteInf

                    java:jboss/exported/LIDP-ADMI2/TestBean2!com.lidp.main.TestBeanRemoteInf

                    java:global/LIDP-ADMI2/TestBean2

                    java:app/LIDP-ADMI2/TestBean2

                    java:module/TestBean2

                 

                08:48:18,290 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named TestBean1 in deployment unit deployment "LIDP-ADMI2.jar" are as follows:

                 

                    java:global/LIDP-ADMI2/TestBean1!com.lidp.main.TestBeanRemoteInf

                    java:app/LIDP-ADMI2/TestBean1!com.lidp.main.TestBeanRemoteInf

                    java:module/TestBean1!com.lidp.main.TestBeanRemoteInf

                    java:jboss/exported/LIDP-ADMI2/TestBean1!com.lidp.main.TestBeanRemoteInf

                    java:global/LIDP-ADMI2/TestBean1

                    java:app/LIDP-ADMI2/TestBean1

                    java:module/TestBean1

                 

                08:48:18,387 INFO  [org.jboss.as] (MSC service thread 1-3) JBAS015874: JBoss AS 7.1.0.Final "Thunder" started in 7278ms - Started 196 of 318 services (120 services are passive or on-demand)

                08:48:18,420 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "LIDP-ADMI2.jar"

                 

                 

                 

                Thanks.

                • 5. Re: Clustering question.
                  Wolf-Dieter Fink Master

                  Hi Joseph,

                   

                  you should not post the same issue in different forum clustering .

                  please continue only in one!

                   

                  Wolf

                  • 6. Re: Clustering question.
                    Radoslav Husar Master

                    Right, you dont need the web.xml if you dont have any web with your application.

                     

                    Currently, adding import org.jboss.ejb3.annotation.Clustered and @Clustered on SLSB has no effect now, on AS5 it did tell the client to loadbalance invocations. Currently its just like interacting with 2 standalone nodes -- so clustering is not going to start since there is no reason. Try SFSB to see that clustering really starts up. But you already got response on the other thread... always make sure to only create 1 thread about one topic.

                    • 7. Re: Clustering question.
                      Radoslav Husar Master

                      BTW I just created https://issues.jboss.org/browse/AS7-3848  to handle clustered SLSBs.

                      • 8. Re: Clustering question.
                        Joseph Fouts Novice

                        Okay Wolf will do.

                         

                        I guess when you can't seem to get the answer you looking for you will try just about anything:)

                         

                        Thanks.

                         

                         

                        Thanks Rado.  I will follow the AS7-3848 feature request that you started.

                        • 9. Re: Clustering question.
                          Joseph Fouts Novice

                          FYI.

                           

                          If I have @Remote defined it still does not log the cluster message.

                           

                          Only after removing @Remote was it finally displaying the cluster message.

                           

                          11:34:38,860 INFO  [stdout] (pool-19-thread-1)

                          11:34:38,861 INFO  [stdout] (pool-19-thread-1) -------------------------------------------------------------------

                          11:34:38,861 INFO  [stdout] (pool-19-thread-1) GMS: address=lidplin12/ejb, cluster=ejb, physical address=10.100.100.12:55200

                          11:34:38,862 INFO  [stdout] (pool-19-thread-1) -------------------------------------------------------------------

                           

                          Okay with all of this said it looks like to get my SLSB to cluster correctly from another SLSB from within the same container I will have to wait for the following:

                           

                          https://issues.jboss.org/browse/AS7-3492

                          https://issues.jboss.org/browse/AS7-3848

                           

                           

                          Both of these say they will fixed in 7.1.1.Final.

                          Does anyone know of the time frame for when 7.1.1.Final will be released?

                           

                          Thanks to all who helped me figure out that JBoss 7 still has some work to do when it comes to supporting full clustering capabilities.

                          • 10. Re: Clustering question.
                            Radoslav Husar Master

                            Only after removing @Remote was it finally displaying the cluster message.

                             

                            Interesting, that doesnt seem right. Can you retry and make sure that is the case?

                            Does anyone know of the time frame for when 7.1.1.Final will be released?

                             

                            Jira knows, look at: https://issues.jboss.org/browse/AS7/fixforversion/12318875

                             

                            Thanks to all who helped me figure out that JBoss 7 still has some work to do when it comes to supporting full clustering capabilities.

                            Well, the most common usecases work very well, the corner cases are often a problem with relatively new projects.

                            • 11. Re: Clustering question.
                              Joseph Fouts Novice

                                  ------> Interesting, that doesnt seem right. Can you retry and make sure that is the case?

                               

                              Ran test again and you are correct.  Having @Remote defined in the SFSB did have

                              the log correctly display the cluster message.

                               

                              Thanks.