Apache Geode CacheServerException Region not found during key set request

喜欢而已 提交于 2019-12-01 13:03:16
Juan Ramos

The error message is saying that the server couldn't find the region, not that the client couldn't connect to the server: Region named /exampleRegion was not found during key set request. Have you defined the exampleRegion on the server side?.

If you're using the Cluster Configuration Service the easiest way to do so is through the GFSH commands, namely create region: gfsh create region --name=exampleRegion --type=REPLICATE.

If you're configuring your members individually using the cache.xml file, the region can be configured as below:

<?xml version="1.0" encoding="UTF-8"?>
<cache
    xmlns="http://geode.apache.org/schema/cache"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
    version="1.0">
  <cache-server/>
  <region name="exampleRegion" refid="REPLICATE"/>
</cache>

I'm using REPLICATE for the sake of simplicity, but you should choose the type of region according to your use case. Hope this helps.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!