6 Replies Latest reply on Jun 18, 2012 6:08 AM by galder.zamarreno

    [UDP] discarded message from different cluster

    alessandro.montanari

      Hi everyone,

      I'm quite new to infinispan and I'm facing this problem:

      I created an application using jboss 6.1 and seam 2.2.2 and then I clusterized it using only one partition.

      With default options everything works fine: for default I mean the default configurations that can be found in infinispan-configs.xml for both web session and sfsb session replication.

      But when I use the configuration "dist" (<namedCache name="dist">) jboss starts to log this warns:

      WARN  [org.jgroups.protocols.UDP] discarded message from different cluster "DefaultPartition-SFSB/ear=myalma-ear.ear,jar=myalma-ejb.jar,name=EditContentBean,service=EJB3" (our cluster is "DefaultPartition-SFSB/ear=myalma-ear.ear,jar=myalma-ejb.jar,name=EditMaterialBean,service=EJB3"). Sender was lab2d127-43546

      WARN  [org.jgroups.protocols.UDP] discarded message from different cluster "DefaultPartition-SFSB/ear=myalma-ear.ear,jar=myalma-ejb.jar,name=EditMaterialBean,service=EJB3" (our cluster is "DefaultPartition-SFSB/ear=myalma-ear.ear,jar=myalma-ejb.jar,name=EditContentBean,service=EJB3"). Sender was lab2d127-45583

      As you can see the node is discarding messages relative to different beans.

      Notice that EditContentBean and EditMaterialBean are two different sfsbs and EditMaterialBean inherits from EditContentBean.

      These messages appear also if I run only one instance of the server (as you can see the sender "lab2d127" is the same).

      Another strange thing is that these messages does not appear when I use the default configurations.

       

      For change the configuration I added @CacheConfig(name="sfsb/dist") on the two beans.

       

      What I have to do in this case? just modify the log options to cut these messages?

        • 1. Re: [UDP] discarded message from different cluster
          sannegrinovero

          Hi Alessandro,

          you are having two clusters started in the same JBossAS instance, they should be isolated but they are using the same port so multicast traffic is received by both. You could ignore it (changing the log levels as you suggest) but a better option would be to change the jgroups configurations so that the two caches use different ports.

           

          An even better solution would be to migrate to JBoss 7.1 as the Infinispan integration evolved dramatically.

          • 2. Re: [UDP] discarded message from different cluster
            alessandro.montanari

            Thanks Sanne,

            I understand but now I'm wondering why I don't get the same messages even when I use the default configuration.

            Just to now here there is my configuration for sfsb (when I use "dist" messages start to appear):

            <!-- stateful session bean cache definitions -->

              <infinispan-config name="sfsb">

                <alias>sfsb-cache</alias>

                <alias>jboss.cache:service=EJB3SFSBClusteredCache</alias>

                <infinispan xmlns="urn:infinispan:config:4.2">

                  <global>

                    <transport clusterName="${jboss.partition.name:DefaultPartition}-SFSB" distributedSyncTimeout="17500">

                      <properties>

                        <property name="stack" value="${jboss.default.jgroups.stack:udp}"/>

                      </properties>

                    </transport>

                    <globalJmxStatistics enabled="true"/>

                    <shutdown hookBehavior="DONT_REGISTER"/>

                  </global>

             

                  <default>

                    <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" useLockStriping="false" concurrencyLevel="1000"/>

                    <jmxStatistics enabled="true"/>

                    <lazyDeserialization enabled="true"/>

                    <invocationBatching enabled="true"/>

                    <clustering mode="replication">

                      <!-- ISPN-835 workaround, use cluster cache loader in place of state transfer -->

                      <!--stateRetrieval timeout="60000" fetchInMemoryState="true"/-->

                      <async useReplQueue="false"/>

                    </clustering>

                    <loaders passivation="true" shared="false">

                      <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" purgeOnStartup="true">

                        <properties>

                          <property name="location" value="${jboss.server.data.dir}${/}sfsb"/>

                        </properties>

                      </loader>

                      <loader class="org.infinispan.loaders.cluster.ClusterCacheLoader">

                        <properties>

                          <property name="remoteCallTimeout" value="60000"/>

                        </properties>

                      </loader>

                    </loaders>

                    <eviction wakeUpInterval="5000" strategy="LRU"/>

                  </default>


                  <namedCache name="sync">

                    <clustering mode="replication">

                      <stateRetrieval timeout="60000" fetchInMemoryState="true"/>

                      <sync/>

                    </clustering>

                    <loaders passivation="true" shared="false">

                      <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" purgeOnStartup="true">

                        <properties>

                          <property name="location" value="${jboss.server.data.dir}${/}sfsb"/>

                        </properties>

                      </loader>

                    </loaders>

                  </namedCache>

             

                  <namedCache name="dist">

                    <clustering mode="distribution">

                      <!-- ISPN-835 workaround, use cluster cache loader in place of state transfer -->

                      <!--stateRetrieval timeout="60000" fetchInMemoryState="false"/-->

                      <hash numOwners="2"/>

                      <l1 enabled="true"/>

                      <async useReplQueue="false"/>

                    </clustering>

                    <loaders passivation="true">

                      <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="false" purgeOnStartup="true">

                        <properties>

                          <property name="location" value="${jboss.server.data.dir}${/}sfsb"/>

                        </properties>

                      </loader>

                      <loader class="org.infinispan.loaders.cluster.ClusterCacheLoader">

                        <properties>

                          <property name="remoteCallTimeout" value="60000"/>

                        </properties>

                      </loader>

                    </loaders>

                  </namedCache>

             

                </infinispan>

              </infinispan-config>

             

            Maybe is something in "clusterName="${jboss.partition.name:DefaultPartition}-SFSB" but then, again, why it's not a problem for default configuration?

            I also discovered that if I user sfsb/sync the messages don't appear, so only in dist mode.

            Thanks

            • 3. Re: [UDP] discarded message from different cluster
              alessandro.montanari

              Looking the startup log I see these messages only when I try to use the distribution mode:

              16:11:36,695 INFO  [JGroupsTransport] Starting JGroups Channel

              16:11:36,696 INFO  [JChannel] JGroups version: 2.11.0.GA

              16:11:36,743 ERROR [JGroupsTransport] Errors instantiating [org.jboss.ha.ispn.DefaultCacheContainerFactory$ChannelFactoryChannelLookup]!  Not using a channel lookup.

              16:11:36,743 INFO  [JGroupsTransport] Unable to use any JGroups configuration mechanisms provided in properties {channelLookup=org.jboss.ha.ispn.DefaultCacheContainerFactory$ChannelFactoryChannelLookup, stack=udp, channelFactory=org.jboss.ha.framework.server.JChannelFactory@13a042e9, channelId=DefaultPartition-SFSB/ear=myalma-ear.ear,jar=myalma-ejb.jar,name=EditContentBean,service=EJB3}.  Using default JGroups configuration!

              ...

              17:18:48,790 INFO  [ComponentsJmxRegistration] Could not register object with name: org.infinispan:type=Cache,name="___defaultcache(dist_async)",manager="sfsb/ear=myalma-ear.ear,jar=myalma-ejb.jar,name=EditMaterialBean,service=EJB3",component=Cache

              ...

              and then the discarded messages warnings start to appear.

              These messages are not present when I use the default configuration, and this doesn't make sense to me because both configurations uses the same jgorups stack.

               

              It seems that jgroups is not working correctly with distribution mode.

              • 4. Re: [UDP] discarded message from different cluster
                galder.zamarreno

                As Sanne said, move to AS 7.1 to avoid headaches

                • 5. Re: [UDP] discarded message from different cluster
                  alessandro.montanari

                  I did it

                  but I have still an issue: with as 7.1.1.Final the distribution mode works but single sign on doesn't work and with the latest nightly build jboss-as-7.2.0.Alpha1-SNAPSHOT (#1013) the single sign on works but distribution mode doesn't work.

                  When I enable "dist" cache for both web and ejb and when I hit a page that uses a SFSB it just loads forever (the transaction is then aborted by arjuna for timeout).

                  • 6. Re: [UDP] discarded message from different cluster
                    galder.zamarreno

                    You probably should be asking about that in the AS7 forum.