[infinispan-dev] Got a local cache despite it is configured as distributed

Sanne Grinovero sanne at infinispan.org
Tue Feb 2 09:29:26 EST 2016


Hi,
that's unlikely to be an Infinispan bug as we have many tests and
other features relying on it.
It probably is a networking configuration problem: if you start
multiple servers in a cluster but they do not manage to connect to
each other they will start as independent nodes (disconnected from
each other) and effectively behave like they were configured in LOCAL
mode.

I would suggest to check your JGroups stack for it using the network
interface that you intended, it using a correct Discovery protocol for
your environment, and possibly details like your firewall?

On 2 February 2016 at 08:19, Pierrick HYMBERT
<pierrick.hymbert at gmail.com> wrote:
> Hi all,
>
> I am blocked to deploy a test app that use a distributed infinispan (8.0.1)
> cache within 2 wildfly (10.0.0) domain nodes and a cache entry producer
> deployed as clustered singleton service.
>
> Your feedback/advise are really appreciated!
>
> Cache definition:
>
>                 <cache-container name="my-cache-container">
>                     <transport lock-timeout="60000"/>
>                     <distributed-cache name="myAppCache" mode="SYNC">
>                         <transaction mode="NONE"/>
>                         <eviction strategy="NONE"/>
>                     </distributed-cache>
>                 </cache-container>
>
> Sample code:
>
>   @Resource(lookup = "java:jboss/infinispan/container/my-cache-container")
>   private EmbeddedCacheManager cacheContainer;
>
>   private Cache<Long, Long> myAppCache;
>
>   @PostConstruct
>   public void startNotClustered() throws NamingException {
>     this.myAppCache = this.cacheContainer.getCache("myAppCache");
>     ...
>   }
>
>   ...
>
>   @Schedule(hour = "*", minute = "*", second = "*")
>   public void consume() {
>     logger.info("Cache size on node {} = {}",
>         System.getProperty("jboss.node.name"), myAppCache.size());
>   }
>
>
> Server one sample logs:
> 2016-01-31 14:52:03,789 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 1) Produce new cache entry 1454241123789 on node
> master:server-one
> 2016-01-31 14:52:04,005 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 2) Cache size on node master:server-one = 35
> 2016-01-31 14:52:04,796 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 3) Produce new cache entry 1454241124796 on node
> master:server-one
> 2016-01-31 14:52:05,006 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 4) Cache size on node master:server-one = 36
> 2016-01-31 14:52:05,801 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 5) Produce new cache entry 1454241125801 on node
> master:server-one
> 2016-01-31 14:52:06,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 6) Cache size on node master:server-one = 37
> 2016-01-31 14:52:06,807 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 7) Produce new cache entry 1454241126807 on node
> master:server-one
> 2016-01-31 14:52:07,005 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 8) Cache size on node master:server-one = 38
> 2016-01-31 14:52:07,813 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 9) Produce new cache entry 1454241127813 on node
> master:server-one
> 2016-01-31 14:52:08,006 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 10) Cache size on node master:server-one = 39
> 2016-01-31 14:52:08,817 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 1) Produce new cache entry 1454241128817 on node
> master:server-one
> 2016-01-31 14:52:09,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 2) Cache size on node master:server-one = 40
>
> Server two logs:
> 2016-01-31 14:51:56,006 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 4) Cache size on node master:server-two = 0
> 2016-01-31 14:51:57,008 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 5) Cache size on node master:server-two = 0
> 2016-01-31 14:51:58,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 6) Cache size on node master:server-two = 0
> 2016-01-31 14:51:59,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 7) Cache size on node master:server-two = 0
> 2016-01-31 14:52:00,006 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 8) Cache size on node master:server-two = 0
> 2016-01-31 14:52:01,008 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 9) Cache size on node master:server-two = 0
> 2016-01-31 14:52:02,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 10) Cache size on node master:server-two = 0
> 2016-01-31 14:52:03,006 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 1) Cache size on node master:server-two = 0
> 2016-01-31 14:52:04,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 2) Cache size on node master:server-two = 0
> 2016-01-31 14:52:05,008 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 3) Cache size on node master:server-two = 0
> 2016-01-31 14:52:06,006 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 4) Cache size on node master:server-two = 0
> 2016-01-31 14:52:07,006 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 5) Cache size on node master:server-two = 0
> 2016-01-31 14:52:08,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 6) Cache size on node master:server-two = 0
> 2016-01-31 14:52:09,007 INFO  [org.hypik.test.jboss.eap7.server.TestService]
> (EJB default - 7) Cache size on node master:server-two = 0
>
>
> I have attached all necessary info to investigate, but I am not sure
> attachement is allowed, so you can see source and logs here:
> https://www.dropbox.com/s/l1uhmfg5tkjkikw/infinispan-issue-wildfly-10.0.0.zip?dl=0
>
> С уважением / Cordialement / Best regards,
>
> Pierrick HYMBERT
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev



More information about the infinispan-dev mailing list