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 ~]#

阅读 17.9k
3 个回答
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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题