2 Replies Latest reply on Aug 18, 2015 5:07 AM by Prashant Thakur

    Infinispan remote query does not work after Hotrod server restart

    Nikolai Sahattchiev Newbie



      I have some troubles getting Infinispan to work in client/server mode.

      I have two Infinispan nodes with hotrod server and two hotrod java clients. The Infinispan nodes are configured in cluster with 'REPL' mode. They have also persistence enabled (leveldb) in order to survive restarts.


      Storing objects from the client via RemoteCacheManager.put(k,v) works fine so far and the objects are replicated from the 1st to the 2nd Hotrod node. Querying the objects via remote query works also but only until I restart the Hotrod servers. After restarting them I can see that all objects are loaded from the persistent store and I'm able to get object via RemoteCacheManager.get(K,V), but the queries do not work any more even the objects are definitely there. The cache is indexed.

      Below you can see the cache configuration. I use Infinispan 6.0.2.Final and upgrading is not an option currently because of other dependencies to Java 1.6.



              <clustering mode="repl">

                  <sync replTimeout="60000"/>

                  <stateTransfer timeout="60000"/>


              <persistence passivation="false">

                  <leveldbStore xmlns=“urn:infinispan:config:store:leveldb:6.0” preload=“true” fetchPersistentState="true" location="/leveldb/data/" expiredLocation="/leveldb/expired/" implementationType="JAVA" />


              <dataContainer keyEquivalence="org.infinispan.commons.equivalence.ByteArrayEquivalence"/>



          <namedCache name=“PERSON_CACHE">

              <indexing enabled="true" indexLocalOnly="true">


                      <property name="default.directory_provider" value="ram" />






      It seems that the cached objects are not indexed when:

      - replicate them from node to node and

      - load them from persistent store


      I cannot imagine that this functionality is not implemented. What am I doing wrong?


      Thanks in advance for your responses!