版本: 8.2-8.9
简而言之,当Elasticsearch集群中的节点被设置为"仅投票"节点时,就会出现此错误。这意味着它参与新主节点的选举,但不保存任何数据或执行任何其他任务。错误消息表明该节点由于其仅投票状态而跳过本地发布。要解决此问题,您可以将节点的角色从"仅投票"更改为常规节点或数据节点,或者如果节点的角色有意设置为仅投票并且按预期运行,则可以忽略该消息。
日志上下文 #
日志“voting-only node skipping local publication to”的类名是 PublicationTransportHandler.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入理解的人参考:
if (isVotingOnlyNode) {
// Voting-only nodes publish their cluster state to other nodes in order to freshen the state held
// on other full master nodes; but then fail the publication before committing. However there's no
// need to freshen our local state so we can fail right away.
throw new TransportException(
new ElasticsearchException("voting-only node skipping local publication to " + destination)
);
} else {
return handlePublishRequest.apply(publishRequest);
}
}





