gpt4 book ai didi

configuration - "master_not_discovered_exception"尝试在远程服务器上配置 Elasticsearch 时

转载 作者:行者123 更新时间:2023-12-03 00:38:15 26 4
gpt4 key购买 nike

我正在尝试在我们的一台远程服务器上配置 Elastic Search。我已经使用 .msi 安装文件 (v7.1.1) 安装了它,并为 9200 和 9300 端口配置了防火墙。

当我将 network.publish_host 设置为服务器 ip 时,它给了我这个错误 默认发现设置不适合生产使用;至少必须配置 [discovery.seed_hosts、discovery.seed_providers、cluster.initial_master_nodes] 之一。然后我做了一些研究并将 cluster.initial_master_nodes 设置为我名为“ElasticSearchNode”的单个节点。现在该服务正在运行,但当我检查集群运行状况时,它显示“master_not_discovered_exception”。

我当前的 yml 文件如下所示:

bootstrap.memory_lock: false
cluster.name: elasticsearch
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
node.name: ElasticSearchNode
path.data: C:\ProgramData\Elastic\Elasticsearch\data
path.logs: C:\ProgramData\Elastic\Elasticsearch\logs
transport.tcp.port: 9300
xpack.license.self_generated.type: basic
xpack.security.enabled: false
network.host: 0.0.0.0
network.publish_host: x.x.x.x
cluster.initial_master_nodes: ElasticSearchNode
discovery.zen.minimum_master_nodes: 1

请求/_cat/health?v 时的响应

{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}

如有任何帮助,我们将不胜感激。

最佳答案

从 ES-7 开始,在 .yml 文件中添加以下配置

cluster.initial_master_nodes : <IP_or_DNS_of_master_node>

关于configuration - "master_not_discovered_exception"尝试在远程服务器上配置 Elasticsearch 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56790620/

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