elasticsearch 7.0.0 新版更新,填個坑node
單機部署提示:docker
error1:跨域
[cluster.initial master nodes] is empty on this nodebash
error:2cors
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 configuredelasticsearch
正確配置ide
vi /usr/share/elasticsearch/config/elasticsearch.yml工具
cluster.name: "docker-cluster"
network.host: 0.0.0.0
# custom config
node.name: "node-1"
discovery.seed_hosts: ["127.0.0.1", "[::1]"]
cluster.initial_master_nodes: ["node-1"]
# 開啓跨域訪問支持,默認爲false
http.cors.enabled: true
# 跨域訪問容許的域名地址,(容許全部域名)以上使用正則
http.cors.allow-origin: /.*/
複製代碼
重點是 node.name
和 cluster.initial_master_nodes
post
原文地址:www.holdlg.com/post/elasti…ui
推薦個在線網頁截圖工具: www.zshua.cc