-
1. Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
beve May 2, 2012 6:33 AM (in response to srikrishnak)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 May 2, 2012 8:07 PM (in response to beve)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 May 3, 2012 2:54 AM (in response to srikrishnak)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 May 7, 2012 5:00 PM (in response to beve)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 Jul 10, 2012 11:27 AM (in response to 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 Mar 27, 2013 5:28 AM (in response to srikrishnak)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 Mar 27, 2013 7:03 AM (in response to moe.harb)Re: jboss 7.1.1 - infinispan - Please separate your clusters cleanly
Make sure to use different multicast group or port for each cache container.