Apache Geode cluster configuration files and troubleshooting

cluster_config目录中When you use the cluster configuration service in Geode, you can check the configuration file created       in the locator .gfsh会在集群级别和独立的组级别来保存配置文件。

       The following directories and configuration files are available on the locator running the cluster configuration service:

Cluster-level configuration
      In order for the configuration file to take effect on all members of the cluster, the locator cluster_config目录内部creates a cluster subdirectory (or in the cluster configuration directory, used when starting the locator --cluster-config-dir=value参数) specifying that all servers receive this configuration when they are started with the gfsh command . This directory includes:

    

  • cluster.xml– A Geode cache.xmlfile contains configuration for all members.
  • cluster.properties– A Geode gemfire.propertiesfile contains properties that apply to all members.
  • Jar file for deployment to all members 

Group level configuration

    When you specify in the gfsh command--group参数,(例如,启动服务器或是创建区域)定位器为每个组的子目录以组名相同的名字写入配置。

When you start a server specifying one or more group names, the server will receive cluster-level configuration as well as configuration for all specified groups. This subdirectory includes:

 

 

  • <group-name>.xml– One cache.xmlfile contains configuration that applies to all members of the group.
  • <group-name>.properties– A Geode gemfire.propertiesfile contains properties that apply to all members of the group
  • Jar file for deploying to all members of the group

You can export a zip file that includes all components of a cluster configuration. This zip file includes the locator'scluster_config(或是其它指定的)子目录中的所有文件。你可以导入这个配置到一个新的集群。查看《导入一导出集群配置》。

 

Standalone configuration files and cluster configuration files

      Geode applies cluster-wide configuration files first and then group-level configuration. If a member uses its own defined configuration files (cache.xml file and gemfire.properties file), these configurations will be applied last. Whenever possible, use the group-level configuration files in the cluster configuration service to replace non-cluster configurations in individual members.

 

Troubleshooting Tips

When you use gfsh启动定位器, you should see the following message:

Cluster configuration service is up and running.

If you don't see this message, there may be a problem with your cluster configuration service. usestatus cluster-configuration-service命令来检查集群配置状态。

  • If the command returns RUNNING, the cluster configuration is running normally.
  • Run if the command returns WAITING status locator命令. The output of the command returns the reason for the WAITING status.

If the server starts with the following exception:

ClusterConfigurationNotAvailableException, the cluster configuration service may not be in RUNNING state. The command to start the server failed because the server requesting the cluster configuration from the locator was unavailable.

  • You can check what configuration the server received from the locator by examining the server's log files. View the Journal

  •  If a start server command specifies a cache.xm file that conflicts with the cluster configuration, the server may fail to start.

  • If a gfsh command fails because the cluster configuration cannot be saved, the following message is displayed:

Failed to persist the configuration changes due to this command,
Revert the command to maintain consistency. Please use "status cluster-config-service"
to determine whether Cluster configuration service is RUNNING."

There are some types of configuration that cannot be used with gfsh. Check out "limitations of gfsh"

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327042755&siteId=291194637