【问题标题】:Gemfire ClusterConfigurationNotAvailableException: Unable to retrieve cluster configuration from the locatorGemfire ClusterConfigurationNotAvailableException:无法从定位器中检索集群配置
【发布时间】:2019-07-31 20:41:15
【问题描述】:

Gemfire 集群由于 ClusterConfigurationNotAvailableException 突然关闭:无法从定位器中检索集群配置

我们有 2 个定位器和 2 个服务器的 Gemfire 集群。我们使用 cache.xml 和 spring data gemfire xml 使用 spring boot 初始化程序引导 Gemfire 缓存服务器。

我们有一个连接到集群的客户端 spring boot 服务。

由于 ClusterConfigurationNotAvailableException:无法从定位器中检索集群配置,Gemfire 集群突然随机关闭。可能是什么原因?重新启动后它可以正常工作一两天没有问题,然后这个问题就来了。它会影响我们的高可用性。请帮助我们解决此问题。

org.apache.geode.GemFireConfigException: cluster configuration service not available
        at org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:1025)
        at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1149)
        at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:758)
        at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:735)
        at org.apache.geode.distributed.internal.InternalDistributedSystem.reconnect(InternalDistributedSystem.java:2748)
        at org.apache.geode.distributed.internal.InternalDistributedSystem.tryReconnect(InternalDistributedSystem.java:2518)
        at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:993)
        at org.apache.geode.distributed.internal.DistributionManager$MyListener.membershipFailure(DistributionManager.java:4354)
        at org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.uncleanShutdown(GMSMembershipManager.java:1556)
        at org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.lambda$forceDisconnect$0(GMSMembershipManager.java:2593)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.geode.internal.config.ClusterConfigurationNotAvailableException: Unable to retrieve cluster configuration from the locator.
        at org.apache.geode.internal.cache.ClusterConfigurationLoader.requestConfigurationFromLocators(ClusterConfigurationLoader.java:259)
        at org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:988)
        ... 10 more

预期行为是 Gemfire 集群的高可用性

【问题讨论】:

    标签: caching gemfire spring-data-gemfire geode


    【解决方案1】:

    默认情况下,每当 GemFire 服务器启动(或在意外关闭后自动重新连接到集群)时,它都会尝试从任何定位器中恢复 Cluster Configuration,如果无法恢复,则该成员将自行关闭,这就是查看附加的堆栈跟踪所发生的事情(请参阅堆栈中org.apache.geode.distributed.internal.InternalDistributedSystem.tryReconnect 的出现)。我将重点分析为什么该成员首先断开连接,随后无法重新连接只是结果,而不是问题的根本原因。

    无论哪种方式,如果您只是使用单个 xml 文件来配置您的成员并且根本不想使用 Cluster Configuration Service,那么您可以使用属性 --enable-cluster-configuration=false 启动您的定位器(默认为true) 和带有--use-cluster-configuration=false 的服务器(默认也是true),这将阻止服务器尝试使用定位器中的集群配置启动。

    希望这会有所帮助。干杯。

    【讨论】:

    • 要记住的另一件事是,默认情况下,SDG 禁用“使用”集群配置。 SDG 有一个强烈的概念,即配置应该只来自一个地方,并且在使用 Spring 时,配置应该主要用 Spring config 来表达。这在很大程度上与 Spring 不仅配置 GemFire 服务器组件(例如区域等)而且可能配置服务器端应用程序组件(回调、函数等)这一事实有关。无论如何,您可以通过设置适当的cache 元素属性来启用 XML 中的集群配置。
    • 在 XML 中,即<gfe:cache ... use-cluster-configuration="true">。然而,正如 Juan 所说。您的服务器无法启动可能还有其他原因,应首先进行调查。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-24
    • 2021-10-05
    • 1970-01-01
    • 1970-01-01
    • 2020-12-08
    • 1970-01-01
    相关资源
    最近更新 更多