ElasticSearch7 設置外網訪問失敗

elasticsearch外網訪問9200端口失敗,bootstrap checks failed,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 configuredhtml

Linux安裝ElasticSearch,修改配置文件elasticsearch.yml 後啓動失敗。node

  • CentOS Linux release 7.5
  • ElasticSearch version 7.3.0
  • Java openjdk version 1.8.0_222

個人設置:npm

vim /etc/elasticsearch/elasticsearch.yml
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#

查看日誌發現 (npm 安裝elasticsearch 日誌路徑 /var/log/elasticsearch)bootstrap

[ERROR][o.e.b.Bootstrap] [localhost.localdomain] node validation exception
[1] bootstrap checks failed
[1]: 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

翻譯過來就是,在discovery.seed_hosts,discovery.seed_providers, cluster.initial_master_nodes中至少設置一項。vim

仔細看了官網文檔:discovery.seed_hosts 設置成默認值便可。bash

discovery.seed_hosts: ["127.0.0.1", "[::1]"]
相關文章
相關標籤/搜索