gpt4 book ai didi

elasticsearch - 在 Elasticsearch 中启动第二个节点时收到错误 “failed to obtain node locks, tried ”

转载 作者:行者123 更新时间:2023-12-02 22:18:48 26 4
gpt4 key购买 nike

我只是学习 flex 搜索的初学者,并开始在Windows 10框中设置2节点群集。

我已经根据论坛和文章配置了两个节点。

但是,我能够启动第一个节点,但是当启动第二个节点时,它将引发错误。

[2018-11-05T16:07:31,935][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [elastic_search_node_02] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\Elastic_search_cluster\data\elastic_search_cluster]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?

以下是两个节点的设置,

节点1目录
C:\Elastic_search_cluster\elasticsearch-6.4.2_node01\

节点2目录
C:\Elastic_search_cluster\elasticsearch-6.4.2_node02\

资料夹

C:\ Elastic_search_cluster \ data \

日志文件夹

C:\ Elastic_search_cluster \ logs \

节点1配置
cluster.name: elastic_search_cluster
node.name: elastic_search_node_01
node.master: true
node.data: true
path.data: C:\Elastic_search_cluster\data\
path.logs: C:\Elastic_search_cluster\logs\
network.host: localhost
http.port: 9200

节点2配置
cluster.name: elastic_search_cluster
node.name: elastic_search_node_02
node.master: false
node.data: true
path.data: C:\Elastic_search_cluster\data\
path.logs: C:\Elastic_search_cluster\logs\
network.host: localhost
http.port: 9201

请提供有关配置或任何其他建议的建议。每个节点的数据和日志文件夹路径是否需要分开。

我是否需要设置其他如下参数?
discovery.zen.ping.unicast.hosts:
discovery.zen.minimum_master_nodes:

最佳答案

确保将node.max_local_storage_nodes参数设置为本地群集中的节点数(在您的情况2中)。我注意到您已经具有不同的节点名称。

在yaml中,

node.max_local_storage_nodes: 2

关于elasticsearch - 在 Elasticsearch 中启动第二个节点时收到错误 “failed to obtain node locks, tried ”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53157387/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com