7 Replies Latest reply on Mar 27, 2013 7:03 AM by rhusar

    jboss 7.1.1 - infinispan - Please separate your clusters cleanly

    srikrishnak

      We are migrating a Dynamic Web Project from jboss-6.0.0.Final to jboss-as-7.1.1.Final and when I configured infinispan caches, it keeps giving me the following warning message.  I've read in the forums that I've to add unique addresses (multicast ?) etc. for each of the clusters, but I do not know where to add the configuration:

       

      Here is my warning message:

       

      [Server:server-1] 17:31:56,561 WARNING [org.jgroups.protocols.MPING] (ReceiverThread) discarding discovery request for cluster 'xyz' from master:server-one/xyz; our cluster name is 'abc'. Please separate your clusters cleanly.
      

       

       

      And here is my config:

       

              <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="cluster">
                      <cache-container name="xyz" default-cache="xyz" jndi-name="java:jboss/infinispan/xyz">
                          <transport stack="tcp"/>
                          <distributed-cache name="xyz" mode="SYNC" start="EAGER">
                              <locking isolation="READ_UNCOMMITTED"/>
                              <eviction strategy="LRU"/>
                              <expiration lifespan="600000"/>
                          </distributed-cache>
                      </cache-container>
      

       

       

      I tried changing to manual discovery by doing the following, but I still get the same warning:

       

                      <stack name="tcp">
                          <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>
                          <protocol type="TCPPING">
                              <property name="initial_hosts">
                                  xx.xx.xx.xx[7600]
                              </property>
                              <property name="port_range">
                                  0
                              </property>
                              <property name="max_dynamic_hosts">
                                  0
                              </property>
                              <property name="num_initial_members">
                                  1
                              </property>
                              <property name="ergonomics">
                                  false
                              </property>
                          </protocol>
      

       

      Thanks

      Srikrishna Kalavacharla

        • 1. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
          beve

          Hi,

           

          one option to separate clusters is to specify a cluster name as an attribute to the cache-container's transport element:

           

          <cache-container name="web" ...>
            <transport cluster="some-cluster-name" .../>
          </cache-container/>
          

          The documentation for the cluster attribute (from the docs/schema/jboss-as-infinispan_1_2.xsd):

          Defines the name for the underlying group communication cluster.
          

           

          What we did was that we added the 'cluster' attribute to all cache-container's in standalone.xml and then specified a system property for them named cluster.name:

          <cache-container name="web" ...>
            <transport cluster="${cluster.name}" .../>
          </cache-container/>
          
          

          With this inplace, we can the set the value for cluster.name at the command line using -Dcluster.name=some-cluster-name

           

          Regards,

           

          /Daniel

          • 2. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
            srikrishnak

            Thanks Daniel,

            I've added a unique cluster name for each of the cache-containers, but I still get the same warning message.  Also I was a bit curious how the setup you have mentioned will work as that means all of the cache-containers have the same cluster name.  Or is it that you just have only one cache-container? 

             

            Here is my new configuration which still generates the same warning message -

             

             

                       <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="cluster">
                            <cache-container name="abcCache" default-cache="abcCache" jndi-name="java:jboss/infinispan/abcCache">
                                <transport stack="tcp" cluster="abcCacheCluster"/>
                                <distributed-cache name="abcCache" mode="SYNC" start="EAGER">
                                    <locking isolation="READ_UNCOMMITTED"/>
                                    <eviction strategy="LRU"/>
                                    <expiration lifespan="600000"/>
                                </distributed-cache>
                            </cache-container>
                            <cache-container name="xyzCache" default-cache="xyzCache" jndi-name="java:jboss/infinispan/xyzCache">
                                <transport stack="tcp" cluster="xyzCacheCluster"/>
                                <distributed-cache name="xyzCache" mode="SYNC" start="EAGER">
                                    <locking isolation="READ_UNCOMMITTED"/>
                                    <eviction strategy="LRU"/>
                                    <expiration lifespan="86400000"/>
                                </distributed-cache>
                            </cache-container>
                            <cache-container name="cluster" aliases="ha-partition" default-cache="default">
                                <transport lock-timeout="60000"/>
                                <replicated-cache name="default" mode="SYNC" batching="true">
                                    <locking isolation="REPEATABLE_READ"/>
                                </replicated-cache>
                            </cache-container>
                            <cache-container name="web" aliases="standard-session-cache" default-cache="repl">
                                <transport lock-timeout="60000"/>
                                <replicated-cache name="repl" mode="ASYNC" batching="true">
                                    <file-store/>
                                </replicated-cache>
                                <replicated-cache name="sso" mode="SYNC" batching="true"/>
                                <distributed-cache name="dist" mode="ASYNC" batching="true">
                                    <file-store/>
                                </distributed-cache>
                            </cache-container>
                            <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl">
                                <transport lock-timeout="60000"/>
                                <replicated-cache name="repl" mode="ASYNC" batching="true">
                                    <eviction strategy="LRU"/>
                                    <file-store/>
                                </replicated-cache>
                                <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/>
                                <distributed-cache name="dist" mode="ASYNC" batching="true">
                                    <eviction strategy="LRU"/>
                                    <file-store/>
                                </distributed-cache>
                            </cache-container>
                            <cache-container name="hibernate" default-cache="local-query">
                                <transport lock-timeout="60000"/>
                                <local-cache name="local-query">
                                    <transaction mode="NONE"/>
                                    <eviction strategy="LRU" max-entries="10000"/>
                                    <expiration max-idle="100000"/>
                                </local-cache>
                                <invalidation-cache name="entity" mode="SYNC">
                                    <transaction mode="NON_XA"/>
                                    <eviction strategy="LRU" max-entries="10000"/>
                                    <expiration max-idle="100000"/>
                                </invalidation-cache>
                                <replicated-cache name="timestamps" mode="ASYNC">
                                    <transaction mode="NONE"/>
                                    <eviction strategy="NONE"/>
                                </replicated-cache>
                            </cache-container>
                        </subsystem>
            


            And here is the warning message:

             

            WARNING [org.jgroups.protocols.MPING] (ReceiverThread) discarding discovery request for cluster 'abcCacheCluster' from master:server-one/abcCacheCluster; our cluster name is 'xyzCacheCluster'. Please separate your clusters cleanly.

            • 3. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
              beve

              Also I was a bit curious how the setup you have mentioned will work as that means all of the cache-containers have the same cluster name.

              Well they would only have the same cluster name for those nodes that should join the same cluster. In our case we have many developers that have multiple nodes on their machines. To avoid cross talk, we added the cluster name to all cache-container so that the each developer would have their own cluster. In our case we set the cluster name to the users name upon startup of AS7.

               

              Hope that makes sense.

               

              Regards,

               

              /Daniel

              • 4. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
                srikrishnak

                Thanks for the clarification.  In my case, adding name did not solve the issue and I still see all cross communicaiton in the form of warning messages.  I'll look further and see if I can solve my problem. 

                 

                Thanks

                Srikrishna Kalavacharla

                • 5. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
                  srikrishnak

                  Problem with the above setup is abcCache and xyzCache are defined in their own cache containers.  Defining the caches in same container solved the issue.  Further cache container name and also mulicast address (jboss.default.multicast.addresss:230.0.0.4 & multicast-address value of modcluster) needs to be different in each environment to prevent cross communication.

                  • 6. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
                    moe.harb

                    Hey there Srikrishna, am new to this so can you please show how did you do that ? cause i am getting the same warnning , and i am using the default configurations to run a cluster though? do i need to add anything in the application or web.xml ??

                    or it is just in this domain.xml ?

                     

                    thanks in advance.

                    • 7. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
                      rhusar

                      Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly

                      Make sure to use different multicast group or port for each cache container.