Pivotal Knowledge Base

Follow

Error message "java.lang.IllegalStateException: Disk store XXXX not found" seen when restarting GemFire cache servers

Environment

Product Version
Pivotal GemFire 7.x - 8.2.x
OS All Supported OS

Symptom

After dynamically creating persistent regions using the gfsh command, GemFire cache servers will throw the following exception when the GemFire cache servers are restarted:

$ ./startServer1.sh 
..........The Cache Server process terminated unexpectedly with exit status 1. Please refer to the log file in /home/gpadmin/apps/gemfireworkdir/server1 for full details.

Exception in thread "main" java.lang.IllegalStateException: Disk store MyDataDS not found
  at com.gemstone.gemfire.internal.cache.LocalRegion.findDiskStore(LocalRegion.java:7969)
  at com.gemstone.gemfire.internal.cache.LocalRegion.(LocalRegion.java:618)
  at com.gemstone.gemfire.internal.cache.DistributedRegion.(DistributedRegion.java:193)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:2951)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:2879)
  at com.gemstone.gemfire.internal.cache.xmlcache.RegionCreation.createRoot(RegionCreation.java:254)
  at com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:500)
  at com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:340)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4247)
  at com.gemstone.gemfire.internal.cache.ClusterConfigurationLoader.applyClusterConfiguration(ClusterConfigurationLoader.java:125)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.requestAndApplySharedConfiguration(GemFireCacheImpl.java:876)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.init(GemFireCacheImpl.java:1017)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:682)
  at com.gemstone.gemfire.cache.CacheFactory.create(CacheFactory.java:182)
  at com.gemstone.gemfire.cache.CacheFactory.create(CacheFactory.java:229)
  at com.gemstone.gemfire.distributed.ServerLauncher.startWithGemFireApi(ServerLauncher.java:792)
  at com.gemstone.gemfire.distributed.ServerLauncher.start(ServerLauncher.java:694)
  at com.gemstone.gemfire.distributed.ServerLauncher.run(ServerLauncher.java:624)
  at com.gemstone.gemfire.distributed.ServerLauncher.main(ServerLauncher.java:194)

For example, the following steps will produce the behavior:

    • Step 1. Start a GemFire cache server with a cache.xml that does not have any region definitions.
    • Step 2. Create a persistent region using thegfsh console as shown here:
      create region --name=MyRegion1 --type=REPLICATE_PERSISTENT --enable-statistics=true --disk-store=MyDataDS --enable-synchronous-disk=true
      
    • Step 3. Stop the GemFire cache server from the gfsh console.
    • Step 4. Restart the GemFire cache server,at which point you will see the given exception.

Resolution

Currently, creating persistent regions at runtime via gfsh is not recommended. Instead, we strongly recommend persistent regions be created via cache.xml definition or by GemFire API.

An example is shown here:

<region name="MyRegion1">
 <region-attributes disk-store-name="MyDataDS" disk-synchronous="true" data-policy="persistent-replicate" statistics-enabled="true">
 </region-attributes>
 </region>

 

Comments

Powered by Zendesk