"Region XXXX does not exist." when creating index from gfsh
search cancel

"Region XXXX does not exist." when creating index from gfsh

book

Article ID: 294361

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

You may fail to create index from gfsh after having initialized the cluster member’s caches via cache-xml-file while using the cluster configuration service.

In the locator's start script:
--enable-cluster-configuration=true

In the cacheserver's start script:
--use-cluster-configuration=true 
--cache-xml-file=/home/gpadmin/GemfireClusterTest/server1/Server1.xml

In the Server1.xml, we define a sample region "TestCustomer" shown below:
......
  <region name="TestCustomer">
    <region-attributes data-policy="persistent-partition" statistics-enabled="true" disk-store-name="test-disk-store">
      <partition-attributes redundant-copies="1" recovery-delay="300000" startup-recovery-delay="60000"/>
    </region-attributes>
  </region>
......

When you try to create an index from gfsh, you will see the "Region XXXX does not exist." error message and it fails to create the index:
Cluster-1 gfsh>create index --name=TestCustomer_field1 --expression=field1 --region=/TestCustomer
Region /TestCustomer does not exist.


Environment

Product Version: 9.9

Resolution

This is a known product issue reported as GEM-3137 for Gemfire 9.9.5, 9.10.5, and earlier versions. The issue happens when initializing member’s cache via cache-xml-file and having the cluster configuration service enabled. Note that the cluster configuration service is enabled by default.

There are three workarounds could help create the index:


Workaround 1

You could add the "--members" option when creating an index from gfsh. For example:
Cluster-1 gfsh>create index --name=TestCustomerindex1 --expression=field1 --region=/TestCustomer --members=server1
Configuration change is not persisted because the command is executed on specific member.

                 Member                  | Status | Message
---------------------------------------- | ------ | --------------------------
10.169.10.209(server1:329496)<v1>:41001 | OK     | Index successfully created


Workaround 2 

You could define the index from the cache xml file instead of gfsh create index command.


Workaround 3

You could disable Gemfire cluster configuration service. In the locator's start script:
--enable-cluster-configuration=false

In the cacheserver's start script:
--use-cluster-configuration=false