No known master node问题

ES集群重启一个节点后,该节点无法加入集群,报错信息:

[2017-02-14 14:35:31,868][ERROR][marvel.agent.exporter    ] [es-06] error adding the marvel template to [[0:0:0:0:0:0:0:0]:9200] response code [503 Service Unavailable]. content: [{"error":"MasterNotDiscoveredException[waited for [30s]]","status":503}]
[2017-02-14 14:35:31,868][ERROR][marvel.agent.exporter    ] [es-06] failed to verify/upload the marvel template to [[0:0:0:0:0:0:0:0]:9200]:Server returned HTTP response code: 503 for URL:http://[0:0:0:0:0:0:0:0]:9200/_template/marvel]

修改配置文件 elasticsearch.yml

network.host: 该节点IP

报错信息:

[2017-02-14 14:46:56,012][DEBUG][action.admin.indices.template.put] [es-06] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
[2017-02-14 14:46:56,014][ERROR][marvel.agent.exporter] [ies-06] error adding the marvel template to [该节点IP:9200] response code [503 Service Unavailable]. content: [{"error":"MasterNotDiscoveredException[waited for [30s]]","status":503}]
[2017-02-14 14:46:56,014][ERROR][marvel.agent.exporter] [es-06] failed to verify/upload the marvel template to [该节点IP:9200]:Server returned HTTP response code: 503 for URL: http://该节点IP:9200/_template/marvel
[2017-02-14 14:46:56,014][ERROR][marvel.agent.exporter] [es-06] could not connect to any configured elasticsearch instances: [该节点IP:9200]
[2017-02-14 14:47:06,019][DEBUG][action.admin.indices.template.get] [es-06] no known master node, scheduling a retry

接着修改:

discovery.zen.ping.unicast.hosts: ["IP1", "IP2",...]

日志正常:

[2017-02-14 14:49:32,032][INFO ][node] [es-06] starting ...
[2017-02-14 14:49:32,204][INFO ][transport] [es-06] bound_address {inet[/该节点IP:9300]}, publish_address {inet[/该节点IP:9300]}
[2017-02-14 14:49:32,214][INFO ][discovery ] [es-06] elasticsearch/PF6CtX38STGjc6D-******
[2017-02-14 14:50:02,215][WARN ][discovery] [es-06] waited for 30s and no initial state was set by the discovery
[2017-02-14 14:50:02,256][INFO ][http] [es-06] bound_address {inet[/该节点IP:9200]}, publish_address {inet[/该节点IP:9200]}
[2017-02-14 14:50:02,257][INFO ][node] [es-06] started
[2017-02-14 14:50:09,939][INFO ][cluster.service] [es-06] detected_master [es-08]

你可能感兴趣的:(Elasticsearch)