4 Replies Latest reply on Sep 20, 2013 8:17 AM by viragegroup

    JBoss 7/EAP6.1 deploy exploded ear in a cluster in standalone mode

    viragegroup Newbie

      Hi all,

       

      As see in the last response of this discussion, it seems that we should be able to deploy an exploded ear in a cluster using several jboss installation in standalone mode.

      But I can't make it work.

       

      I'm following this tutorial.

       

      I have an exploded ear (ejb3 and war). First, I successfully deployed it on 1 jboss EAP 6.1 in standalone mode.

       

      Now, I try to create a cluster from 2 JBoss EAP 6.1, each in standalone mode. I'm using the following command with the standalone-ha.xml file out of the box:

       

      bin\standalone.bat -c standalone-ha.xml

       

      and

       

      bin\standalone.bat -c standalone-ha.xml -Djboss.socket.binding.port-offset=100

       

      My exploded ear is deployed on each standalone jboss

       

      but Session replication is NOT working as expected. The 2 JBoss do not seem to start the "cluster service".

       

      In fact, there is no error in the logs.

       

      There is always the following lines

       

      14:30:50,026 INFO  ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan] - JBAS010280: Activation du sous-système Infinispan

      14:30:50,042 INFO  ServerService Thread Pool -- 35(:) [org.jboss.as.clustering.jgroups] - JBAS010260: Activation du sous-système JGroups

      ...

      14:30:50,790 DEBUG ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan.subsystem] - web cache container installed

      14:30:50,806 INFO  ServerService Thread Pool -- 31(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

      14:30:50,806 DEBUG ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan.subsystem] - Cache configuration service for repl installed for container web

      14:30:50,806 DEBUG ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan.subsystem] - Cache service for cache repl installed for container web

      14:30:50,822 DEBUG ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan.subsystem] - Cache configuration service for sso installed for container web

      14:30:50,822 DEBUG ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan.subsystem] - Cache service for cache sso installed for container web

      14:30:50,822 INFO  ServerService Thread Pool -- 31(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

      14:30:50,822 DEBUG ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan.subsystem] - Cache configuration service for dist installed for container web

      14:30:50,822 DEBUG ServerService Thread Pool -- 31(:) [org.jboss.as.clustering.infinispan.subsystem] - Cache service for cache dist installed for container web

      ...

       

       

      If I try with a packaged demo war file (found with a tutorial), the Session replication is working. In the logs file, the following line:

       

          17:34:21,034 INFO MSC service thread 1-4(:) [org.jboss.as.clustering] - JBAS010238: Number of cluster members: 2

       

      only appears with the packaged war file. If I deploy my own exploded ear, or if I deploy an exploded version of demo war, the line above does not show up.

       

      Yes, my ear contains a war directory that contains web.xml file. This one contains a

       

      <distributable/>

       

      tag.

       

      Is anyone know if there is some limitation with clustering and exploded ear/war ?

        • 1. Re: JBoss 7/EAP6.1 deploy exploded ear in a cluster in standalone mode
          jaikiran pai Master

          Have you placed a .dodeploy marker for each of those exploded deployments in the deployment folder?

          • 2. Re: JBoss 7/EAP6.1 deploy exploded ear in a cluster in standalone mode
            viragegroup Newbie

            Yes, that the way I deploy each instance of my ear.

            In fact, each ear are successfully deployed. I can reach my web app via mod_cluster and load balancing.

             

            but if I shutdown one server, the sessions of this server are lost.

            I seems that infinispan/jgroups stuff do not communicate between servers for my exploded ear. But they do communicate if I deploy a packaged war.

             

            Any idea ?

            • 3. Re: JBoss 7/EAP6.1 deploy exploded ear in a cluster in standalone mode
              viragegroup Newbie

              I packaged my ear app into a single ear file and deployed it successfully. But the session are still not replicated.

              So, My issue is not related to the fact that I used an exploded ear structure.

              Exploded or not, when deployed in ha-standalone mode, session are never replicated.

              It's just like JBoss does not take into account the <distributable/> tag in my web.xml. There is no error in log file.

               

              Nevertheless, the demo war app does not work when its war is exploded but works when zipped in a single file.

               

              The following logs only appears with the demo packaged war

               

              19:13:46,459 INFO  MSC service thread 1-2(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

              19:13:46,459 INFO  MSC service thread 1-2(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

              19:13:46,459 DEBUG MSC service thread 1-2(:) [org.jboss.as.clustering.infinispan.subsystem] - repl cache configuration started

              19:13:46,459 DEBUG MSC service thread 1-2(:) [org.jboss.as.clustering.infinispan.subsystem] - sso cache configuration started

              19:13:46,459 INFO  MSC service thread 1-2(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

              19:13:46,459 INFO  MSC service thread 1-2(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

              19:13:46,459 INFO  MSC service thread 1-7(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

              19:13:46,459 DEBUG MSC service thread 1-2(:) [org.jboss.as.clustering.infinispan.subsystem] - dist cache configuration started

              19:13:46,475 INFO  MSC service thread 1-7(:) [org.infinispan.configuration.cache.EvictionConfigurationBuilder] - ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.

              19:13:46,475 DEBUG MSC service thread 1-7(:) [org.jboss.as.clustering.infinispan.subsystem] - default-host/demo cache configuration started

              19:13:46,522 INFO  ServerService Thread Pool -- 63(:) [org.infinispan.remoting.transport.jgroups.JGroupsTransport] - ISPN000078: Starting JGroups Channel

              19:13:46,553 INFO  ServerService Thread Pool -- 63(:) [stdout] -

              19:13:46,553 INFO  ServerService Thread Pool -- 63(:) [stdout] - -------------------------------------------------------------------

              19:13:46,553 INFO  ServerService Thread Pool -- 63(:) [stdout] - GMS: address=myMachine/web, cluster=web, physical address=127.0.0.1:55200

              19:13:46,553 INFO  ServerService Thread Pool -- 63(:) [stdout] - -------------------------------------------------------------------

              19:13:48,596 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.remoting.transport.jgroups.JGroupsTransport] - New view accepted: [myMachine/web|0] [myMachine/web]

              19:13:48,596 INFO  ServerService Thread Pool -- 63(:) [org.infinispan.remoting.transport.jgroups.JGroupsTransport] - ISPN000094: Received new cluster view: [myMachine/web|0] [myMachine/web]

              19:13:48,628 INFO  ServerService Thread Pool -- 63(:) [org.infinispan.remoting.transport.jgroups.JGroupsTransport] - ISPN000079: Cache local address is myMachine/web, physical addresses are [127.0.0.1:55200]

              19:13:48,628 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.remoting.transport.jgroups.JGroupsTransport] - Waiting on view being accepted

              19:13:48,628 INFO  ServerService Thread Pool -- 63(:) [org.infinispan.factories.GlobalComponentRegistry] - ISPN000128: Infinispan version: Infinispan 'Delirium' 5.2.6.Final

              19:13:48,674 INFO  ServerService Thread Pool -- 63(:) [org.infinispan.factories.TransactionManagerFactory] - ISPN000161: Using a batchMode transaction manager

              19:13:48,690 INFO  ServerService Thread Pool -- 62(:) [org.infinispan.factories.TransactionManagerFactory] - ISPN000161: Using a batchMode transaction manager

              19:13:48,768 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.marshall.jboss.AbstractJBossMarshaller] - Using JBoss Marshalling

              19:13:48,768 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.marshall.jboss.AbstractJBossMarshaller] - Using JBoss Marshalling

              19:13:48,830 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.loaders.file.FileCacheStore] - Using PER_WRITE file sync mode

              19:13:48,830 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.loaders.file.FileCacheStore] - Using PER_WRITE file sync mode

              19:13:48,830 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.interceptors.InterceptorChain] - Interceptor chain size: 13

              19:13:48,830 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.interceptors.InterceptorChain] - Interceptor chain size: 13

              19:13:48,830 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.interceptors.InterceptorChain] - Interceptor chain is:

                  >> org.infinispan.interceptors.BatchingInterceptor

                  >> org.infinispan.interceptors.InvocationContextInterceptor

                  >> org.infinispan.interceptors.CacheMgmtInterceptor

                  >> org.infinispan.statetransfer.StateTransferInterceptor

                  >> org.infinispan.statetransfer.TransactionSynchronizerInterceptor

                  >> org.infinispan.interceptors.TxInterceptor

                  >> org.infinispan.interceptors.NotificationInterceptor

                  >> org.infinispan.interceptors.locking.OptimisticLockingInterceptor

                  >> org.infinispan.interceptors.EntryWrappingInterceptor

                  >> org.infinispan.interceptors.ClusteredActivationInterceptor

                  >> org.infinispan.interceptors.PassivationInterceptor

                  >> org.infinispan.interceptors.ReplicationInterceptor

                  >> org.infinispan.interceptors.CallInterceptor

              19:13:48,830 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.interceptors.InterceptorChain] - Interceptor chain is:

                  >> org.infinispan.interceptors.BatchingInterceptor

                  >> org.infinispan.interceptors.InvocationContextInterceptor

                  >> org.infinispan.interceptors.CacheMgmtInterceptor

                  >> org.infinispan.statetransfer.StateTransferInterceptor

                  >> org.infinispan.statetransfer.TransactionSynchronizerInterceptor

                  >> org.infinispan.interceptors.TxInterceptor

                  >> org.infinispan.interceptors.NotificationInterceptor

                  >> org.infinispan.interceptors.locking.OptimisticLockingInterceptor

                  >> org.infinispan.interceptors.EntryWrappingInterceptor

                  >> org.infinispan.interceptors.ClusteredActivationInterceptor

                  >> org.infinispan.interceptors.PassivationInterceptor

                  >> org.infinispan.interceptors.ReplicationInterceptor

                  >> org.infinispan.interceptors.CallInterceptor

              19:13:48,830 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.jmx.JmxUtil] - Object name jboss.infinispan:type=Cache,name="repl(repl_async)",manager="web",component=Cache already registered

              19:13:48,830 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.jmx.JmxUtil] - Object name jboss.infinispan:type=Cache,name="default-host/demo(repl_async)",manager="web",component=Cache already registered

              19:13:48,830 INFO  ServerService Thread Pool -- 62(:) [org.infinispan.jmx.CacheJmxRegistration] - ISPN000031: MBeans were successfully registered to the platform MBean server.

              19:13:48,830 INFO  ServerService Thread Pool -- 63(:) [org.infinispan.jmx.CacheJmxRegistration] - ISPN000031: MBeans were successfully registered to the platform MBean server.

              19:13:48,830 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.topology.LocalTopologyManagerImpl] - Node myMachine/web joining cache repl

              19:13:48,830 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.topology.LocalTopologyManagerImpl] - Node myMachine/web joining cache default-host/demo

              19:13:48,830 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.topology.LocalTopologyManagerImpl] - Updating local consistent hash(es) for cache repl: new topology = CacheTopology{id=0, currentCH=ReplicatedConsistentHash{members=[myMachine/web]}, pendingCH=null}

              19:13:48,830 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.topology.LocalTopologyManagerImpl] - Updating local consistent hash(es) for cache default-host/demo: new topology = CacheTopology{id=0, currentCH=ReplicatedConsistentHash{members=[myMachine/web]}, pendingCH=null}

              19:13:48,846 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.statetransfer.StateConsumerImpl] - Adding inbound state transfer for segments [0] of cache default-host/demo

              19:13:48,846 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.statetransfer.StateConsumerImpl] - Adding inbound state transfer for segments [0] of cache repl

              19:13:48,846 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.statetransfer.StateConsumerImpl] - Finished adding inbound state transfer for segments [0] of cache repl

              19:13:48,846 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.statetransfer.StateConsumerImpl] - Finished adding inbound state transfer for segments [0] of cache default-host/demo

              19:13:48,846 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.transaction.TransactionTable] - Topology changed, recalculating minTopologyId

              19:13:48,846 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.transaction.TransactionTable] - Topology changed, recalculating minTopologyId

              19:13:48,846 INFO  ServerService Thread Pool -- 63(:) [org.jboss.as.clustering.infinispan] - JBAS010281: Cache repl démarré depuis le conteneur web

              19:13:48,846 INFO  ServerService Thread Pool -- 62(:) [org.jboss.as.clustering.infinispan] - JBAS010281: Cache default-host/demo démarré depuis le conteneur web

              19:13:48,846 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.CacheImpl] - Started cache repl on myMachine/web

              19:13:48,846 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.CacheImpl] - Started cache default-host/demo on myMachine/web

              19:13:48,846 DEBUG ServerService Thread Pool -- 63(:) [org.infinispan.CacheImpl] - Started cache repl on myMachine/web

              19:13:48,846 DEBUG ServerService Thread Pool -- 62(:) [org.infinispan.CacheImpl] - Started cache default-host/demo on myMachine/web

              19:13:48,846 DEBUG ServerService Thread Pool -- 63(:) [org.jboss.as.clustering.infinispan.subsystem] - repl cache started

              19:13:48,846 DEBUG ServerService Thread Pool -- 62(:) [org.jboss.as.clustering.infinispan.subsystem] - default-host/demo cache started

              19:13:48,862 DEBUG MSC service thread 1-2(:) [org.jboss.as.clustering] - ViewAccepted: initial members set for partition web: 0 (org.jboss.as.clustering.impl.CoreGroupCommunicationService$GroupView@511401bb)

              19:13:48,862 INFO  MSC service thread 1-2(:) [org.jboss.as.clustering] - JBAS010238: Number of cluster members: 1

              19:13:48,862 DEBUG MSC service thread 1-2(:) [org.jboss.as.clustering] - myMachine/web

              19:13:48,862 DEBUG AsynchViewChangeHandler Thread(:) [org.jboss.as.clustering.impl.CoreGroupCommunicationService$ViewChangeEventProcessor.AsynchViewChangeHandler] - Begin AsynchViewChangeHandler Thread

               

              Any ideas ?

              • 4. Re: JBoss 7/EAP6.1 deploy exploded ear in a cluster in standalone mode
                viragegroup Newbie

                Hi all,

                Wrong track,

                my ear was not "distributable" due to javamelody 1.44 and especially because of the issue 321.

                 

                Hope it can helps.