尝试在远程服务器上配置弹性搜索时"master_not_discovered_exception"



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

当我将network.publish_host设置为服务器IP时,它给了我这个错误the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured。然后,我进行了一些研究,并将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:ProgramDataElasticElasticsearchdata
path.logs: C:ProgramDataElasticElasticsearchlogs
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>

来自ES7,它对我有用:

  1. sudo nano /etc/elasticsearch/elasticsearch.yml

  2. node.name

    uncomment
  3. network.host更改为 0.0.0.0discovery.seed.hosts[“127.0.0.1”]cluster.initial_master_nodes to [“node-1”]

  4. 完成后,退出nano,然后键入:ctrl-x,键入yes

  5. sudo /bin/systemctl daemon-reload

  6. sudo /bin/systemctl enable elasticsearch.service

  7. sudo /bin/systemctl restart elasticsearch.service

相关内容

  • 没有找到相关文章

最新更新