--- title: "仅当 joinVotes 对新配置具有法定人数时才允许重新配置 - 如何解决此 Elasticsearch 异常" date: 2026-03-27 lastmod: 2026-03-27 description: "当 Elasticsearch 集群正在重新配置且新配置没有加入投票的法定人数时,会出现此错误。这是防止数据丢失或脑裂情况的安全措施。" tags: ["集群配置", "法定人数", "重新配置"] summary: "版本: 7-8.9 简而言之,当 Elasticsearch 集群正在重新配置且新配置没有加入投票的法定人数时,会出现此错误。这是防止数据丢失或脑裂情况的安全措施。要解决此问题,请确保大多数节点可用且能够在重新配置期间相互通信。如果某些节点宕机,请将它们恢复在线。如果网络问题阻止通信,请解决这些问题。此外,检查集群设置并在必要时进行调整以确保能够达到法定人数。 日志上下文 # 日志"only allow reconfiguration if joinVotes have quorum for new config"的类名是 CoordinationState.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用: logger.debug("handleClientValue: only allow reconfiguration while not already reconfiguring"); throw new CoordinationStateRejectedException("only allow reconfiguration while not already reconfiguring"); } if (joinVotesHaveQuorumFor(clusterState.getLastAcceptedConfiguration()) == false) { logger.debug("handleClientValue: only allow reconfiguration if joinVotes have quorum for new config"); throw new CoordinationStateRejectedException("only allow reconfiguration if joinVotes have quorum for new config"); } assert clusterState." --- > **版本:** 7-8.9 简而言之,当 Elasticsearch 集群正在重新配置且新配置没有加入投票的法定人数时,会出现此错误。这是防止数据丢失或脑裂情况的安全措施。要解决此问题,请确保大多数节点可用且能够在重新配置期间相互通信。如果某些节点宕机,请将它们恢复在线。如果网络问题阻止通信,请解决这些问题。此外,检查集群设置并在必要时进行调整以确保能够达到法定人数。 日志上下文 ----------- 日志"only allow reconfiguration if joinVotes have quorum for new config"的类名是 [CoordinationState.java。](https://www.geeksforgeeks.org/java-lang-class-class-java-set-1/) 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用: ```java logger.debug("handleClientValue: only allow reconfiguration while not already reconfiguring"); throw new CoordinationStateRejectedException("only allow reconfiguration while not already reconfiguring"); } if (joinVotesHaveQuorumFor(clusterState.getLastAcceptedConfiguration()) == false) { logger.debug("handleClientValue: only allow reconfiguration if joinVotes have quorum for new config"); throw new CoordinationStateRejectedException("only allow reconfiguration if joinVotes have quorum for new config"); } assert clusterState.getLastCommittedConfiguration().equals(getLastCommittedConfiguration()) : "last committed configuration should not change"; ```