【问题标题】:Creating separate elasticsearch nodes of master+data and client+data分别创建master+data和client+data的elasticsearch节点
【发布时间】:2014-06-18 09:59:28
【问题描述】:

我们目前有一个强大的 12 节点集群,其中所有节点都是合格的主节点、客户端和数据。 最近我们遇到了一个裂脑问题,即主节点没有响应的时间足够长,以至于另一个节点选择了自己。尽管所有节点都已启动并且 minimum_master_nodes 设置为 7(新的 master 可以看到 10 个其他符合条件的节点)。 我们希望通过将其中的 3 个节点设置为主节点,将其他 9 个节点设置为客户端,而所有 12 个仍然是数据节点,从而降低这种风险。 我以为我们可以设置:

node.master: true
node.client: false
node.data: true

在 3 个节点上:

node.master: false
node.client: true
node.data: true

在另外 9 个。 结果是:

"org.elasticsearch.ElasticsearchIllegalStateException: node is not configured to store local location" 

我一直在寻找无济于事。有没有正确的方法来做到这一点?

【问题讨论】:

    标签: configuration elasticsearch


    【解决方案1】:

    我会跳过使用 node.client - 它实际上与您的 node.data 设置冲突,这就是导致错误消息的原因。它也不是必需的。

    你只需要 node.master 和 node.data。如果两者都为真(默认),则它既是数据节点又是主节点。如果 master 为 false 且 data 为 true,则它是仅数据节点。如果 master 为 true 且 data 为 false,则它是仅 master 节点。如果两者都为 false,则它是客户端节点。

    来自 1.2.1 版当前默认的 elasticsearch.yml 文件:

    # You can exploit these settings to design advanced cluster topologies.
    #
    # 1. You want this node to never become a master node, only to hold data.
    #    This will be the "workhorse" of your cluster.
    #
    #node.master: false
    #node.data: true
    #
    # 2. You want this node to only serve as a master: to not store any data and
    #    to have free resources. This will be the "coordinator" of your cluster.
    #
    #node.master: true
    #node.data: false
    #
    # 3. You want this node to be neither master nor data node, but
    #    to act as a "search load balancer" (fetching data from nodes,
    #    aggregating results, etc.)
    #
    #node.master: false
    #node.data: false
    

    【讨论】:

    • 完全错过了配置 cmets!我们得到了一个通过 puppet 分发的精简配置,但显然我们也需要 cmets。我们发现 master+data 节点上的设置: node.client: false 和 client+data 节点上的 node.master: false 正在工作。谢谢!
    猜你喜欢
    • 2022-01-12
    • 2015-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多