H5W3
当前位置:H5W3 > 其他技术问题 > 正文

elasticsearch-6.2.2启动后CURL请求后报 master_not_discovered_exception错误

elasticsearch-6.2.2启动后CURL请求后报 master_not_discovered_exception错误
环境说明:
192.168.33.10 master
192.168.33.11 master data
192.168.33.12 master data

配置文件:

 192.168.33.10:
     cluster.name: my-application
     node.name: node-10
    transport.host: localhost
    transport.tcp.port: 9300
   network.host: 192.168.33.10
   http.port: 9200
  discovery.zen.ping.unicast.hosts: ["192.168.33.10","192.168.33.11",'192.168.33.12']
  discovery.zen.minimum_master_nodes: 2
 gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false



192.168.33.11:

    cluster.name: my-application
     node.name: node-11
    transport.host: localhost
    transport.tcp.port: 9300
   network.host: 192.168.33.11
   http.port: 9200
   discovery.zen.ping.unicast.hosts: ["192.168.33.10","192.168.33.11",'192.168.33.12']
  discovery.zen.minimum_master_nodes: 2
  gateway.recover_after_nodes: 3
 node.master: true
 node.data: true
 node.ingest: false
 search.remote.connect: false

192.168.33.12:

    cluster.name: my-application
     node.name: node-12
    transport.host: localhost
    transport.tcp.port: 9300
   network.host: 192.168.33.12
   http.port: 9200
   discovery.zen.ping.unicast.hosts: ["192.168.33.10","192.168.33.11",'192.168.33.12']
  discovery.zen.minimum_master_nodes: 2
  gateway.recover_after_nodes: 3
 node.master: true
 node.data: true
 node.ingest: false
 search.remote.connect: false

[root@localhost ~]# curl http://192.168.33.10/:9200/_cat/master?v
{“error”:{“root_cause”:[{“type”:”master_not_discovered_exception”,”reason”:null}],”type”:”master_not_discovered_exception”,”reason”:null},”status”:503}[root@localhost ~]#

回答:

discovery.zen.ping.unicast.hosts: ["192.168.33.10","192.168.33.11",'192.168.33.12']

不应当包含本机的ip,5.6.x版本是这样的,不知道6.x版本是不是

回答:

将#discovery.zen.minimum_master_nodes: 3 注释打开,修改为discovery.zen.minimum_master_nodes: 1 重启ec服务 看看如何

回答:

指定初始节点就好
cluster.initial_master_nodes: node-1

本文地址:H5W3 » elasticsearch-6.2.2启动后CURL请求后报 master_not_discovered_exception错误

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址