【ElasticSearch 6.*】 学习三:分布式安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_31617637/article/details/85094897
  • 主master的配置
cluster.name: lihe
node.name: master
node.master: true
network.host: 127.0.0.1
  • 分slave的配置
xpack.ml.enabled: fales
http.cors.enabled: true
http.cors.allow-origin: "*"
cluster.name: lihe
node.name: slave1
node.master: false
network.host: 127.0.0.1
http.port: 8200
discovery.zen.ping.unicast.hosts: ["127.0.0.1"]

tip:

  • cluster.name 必须保持一致

  • salve的discovery.zen.ping.unicast.hosts不能缺少不然找不到master

  • 启动服务报错:[2018-12-19T11:19:49,420][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [master] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[D:\Mooc\elasticsearch-6.5.3\data\lihe]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?

    解决方法:rm -rf data/nodes

  • 启动服务 访问head
    在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_31617637/article/details/85094897
今日推荐