Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-14366

IllegalStateException: Error reading header from x at Cache.get()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 14.0.1.Final
    • None
    • None
    • Hide

      Config is done programmatically and set to the following:
      Config for CacheManager:

      configurationBuilderHolder.getGlobalConfigurationBuilder()
                  .clusteredDefault()
                      .cacheManagerName("CacheManager")
                  .cacheContainer()
                      .statistics(true)
                  .globalState()
                      .configurationStorage(ConfigurationStorage.OVERLAY)
                      .persistentLocation(cacheDir)
                  .transport()
                      .clusterName(clusterName)
                      .addProperty("configurationFile", "jgroups.xml")
                      .nodeName(hostName + ":" + httpPort)
                  .defaultCacheName("DEFAULT_CACHE")
                  .addModule(ClusteredLockManagerConfigurationBuilder.class)
                      .numOwner(2)
                      .reliability(Reliability.AVAILABLE);

       

      Config for Default-Cache:

      configurationBuilderHolder.newConfigurationBuilder("DEFAULT_CACHE")
                  .encoding()
                      .mediaType("application/x-protostream")
                  .memory()
                      .whenFull(EvictionStrategy.NONE)
                      .maxCount(-1)
                  .expiration()
                      .lifespan(-1)
                      .disableReaper()
                  .statistics()
                      .enable()
                  .clustering()
                      .cacheMode(CacheMode.REPL_SYNC)
                      .remoteTimeout(2, TimeUnit.MINUTES)
                  .stateTransfer()
                      .awaitInitialTransfer(false)
                      .fetchInMemoryState(true)
                      .timeout(10, TimeUnit.MINUTES)
                      .chunkSize(1024)
                  .transaction()
                      .lockingMode(LockingMode.PESSIMISTIC)
                      .autoCommit(true)                
                      .completedTxTimeout(60000)
                      .transactionMode(TransactionMode.TRANSACTIONAL)
                      .useSynchronization(false)
                      .notifications(true)
                      .reaperWakeUpInterval(30000)
                      .cacheStopTimeout(30000)
                      .transactionManagerLookup(new GenericTransactionManagerLookup())
                      .recovery()
                          .disable()
                  .locking()
                      .isolationLevel(IsolationLevel.REPEATABLE_READ)
                      .lockAcquisitionTimeout(1, TimeUnit.MINUTES); 

      Config for concrete Cache, inherited partially by default cache:

      ConfigurationChildBuilder cb = ((ConfigurationChildBuilder) new ConfigurationBuilder()
                      .read(defaultConfig)
                      .persistence()
                          .passivation(false)                                                                
                          .addSoftIndexFileStore()
                          .location(cacheDir)
                          .indexLocation(cacheDir)
                          .dataLocation(cacheDir)
                          .segmented(true)
                          .shared(false)
                          .preload(true)
                          .async()
                              .enabled(true));
              
                  cb = cb.memory()
                          .whenFull(EvictionStrategy.REMOVE)
                          .maxCount(evictionSize);
                          
                  cb = cb.indexing()
                          .enable()
                          .storage(IndexStorage.LOCAL_HEAP)
                          .addKeyTransformer(LocalDate.class, LocalDateTransformer.class)
                          .addIndexedEntity(IndexedClass); 

      As this happens only sporadically, I can't give an exact replication path... But the exception occurs while loading data from the cache-store on startup.

      Show
      Config is done programmatically and set to the following: Config for CacheManager: configurationBuilderHolder.getGlobalConfigurationBuilder()             .clusteredDefault()                 .cacheManagerName( "CacheManager" )             .cacheContainer()                 .statistics( true )             .globalState()                 .configurationStorage(ConfigurationStorage.OVERLAY)                 .persistentLocation(cacheDir)             .transport()                 .clusterName(clusterName)                 .addProperty( "configurationFile" , "jgroups.xml" )                 .nodeName(hostName + ":" + httpPort)             .defaultCacheName( "DEFAULT_CACHE" )             .addModule(ClusteredLockManagerConfigurationBuilder.class)                 .numOwner(2)                 .reliability(Reliability.AVAILABLE);   Config for Default-Cache: configurationBuilderHolder.newConfigurationBuilder( "DEFAULT_CACHE" )             .encoding()                 .mediaType( "application/x-protostream" )             .memory()                 .whenFull(EvictionStrategy.NONE)                 .maxCount(-1)             .expiration()                 .lifespan(-1)                 .disableReaper()             .statistics()                 .enable()             .clustering()                 .cacheMode(CacheMode.REPL_SYNC)                 .remoteTimeout(2, TimeUnit.MINUTES)             .stateTransfer()                 .awaitInitialTransfer( false )                 .fetchInMemoryState( true )                 .timeout(10, TimeUnit.MINUTES)                 .chunkSize(1024)             .transaction()                 .lockingMode(LockingMode.PESSIMISTIC)                 .autoCommit( true )                                 .completedTxTimeout(60000)                 .transactionMode(TransactionMode.TRANSACTIONAL)                 .useSynchronization( false )                 .notifications( true )                 .reaperWakeUpInterval(30000)                 .cacheStopTimeout(30000)                 .transactionManagerLookup( new GenericTransactionManagerLookup())                 .recovery()                     .disable()             .locking()                 .isolationLevel(IsolationLevel.REPEATABLE_READ)                 .lockAcquisitionTimeout(1, TimeUnit.MINUTES); Config for concrete Cache, inherited partially by default cache: ConfigurationChildBuilder cb = ((ConfigurationChildBuilder) new ConfigurationBuilder()                 .read(defaultConfig)                 .persistence()                     .passivation( false )                     .addSoftIndexFileStore()                  .location(cacheDir)                     .indexLocation(cacheDir)                     .dataLocation(cacheDir)                     .segmented( true )                     .shared( false )                     .preload( true )                     .async()                         .enabled( true ));                      cb = cb.memory()                     .whenFull(EvictionStrategy.REMOVE)                     .maxCount(evictionSize);                                  cb = cb.indexing()                     .enable()                     .storage(IndexStorage.LOCAL_HEAP)                     .addKeyTransformer(LocalDate.class, LocalDateTransformer.class)                     .addIndexedEntity(IndexedClass); As this happens only sporadically, I can't give an exact replication path... But the exception occurs while loading data from the cache-store on startup.

      An IllegalStateException is thrown on cache-startup while loading data from SoftIndexFileStore:

       java.lang.IllegalStateException: Error reading header from 0:603921 | 0
          at org.infinispan.persistence.sifs.IndexNode$LeafNode.getHeaderAndKey(IndexNode.java:1113) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.IndexNode$LeafNode.loadHeaderAndKey(IndexNode.java:1093) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.IndexNode.calculateMaxSeqId(IndexNode.java:352) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.IndexNode.calculateMaxSeqId(IndexNode.java:358) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.IndexNode.calculateMaxSeqId(IndexNode.java:358) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.IndexNode.calculateMaxSeqId(IndexNode.java:358) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.IndexNode.calculateMaxSeqId(IndexNode.java:340) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.Index.getMaxSeqId(Index.java:362) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.persistence.sifs.NonBlockingSoftIndexFileStore.lambda$start$0(NonBlockingSoftIndexFileStore.java:238) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800) ~[?:?]
          at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          ... 1 more
      Wrapped by: java.util.concurrent.CompletionException: java.lang.IllegalStateException: Error reading header from 0:603921 | 0
          at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
          at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
          at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1803) ~[?:?]
          at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) ~[jboss-threads-2.3.3.Final.jar:2.3.3.Final]
          ... 1 more
      Wrapped by: org.infinispan.commons.CacheConfigurationException: ISPN000659: Component org.infinispan.persistence.manager.PersistenceManager failed to start
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:585) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:635) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:599) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:635) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:599) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:635) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:599) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:635) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:599) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:357) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:250) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:217) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:1009) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.cache.impl.AbstractDelegatingCache.start(AbstractDelegatingCache.java:504) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:722) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:668) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:557) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final]
          at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:571) ~[infinispan-core-14.0.1.Final.jar:14.0.1.Final] 

              Unassigned Unassigned
              prom3thean Thomas Meier (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: