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 configured

Linux安裝ElasticSearch,修改配置文件elasticsearch.yml 后啟動失敗。

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

我的設置:

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)

[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中至少設置一項。

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

discovery.seed_hosts: ["127.0.0.1", "[::1]"]


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM