Elasticse报错-org.elasticsearch.discovery.MasterNotDiscoveredException: null

Issue

[2019-05-28T23:16:19,548][WARN ][r.suppressed             ] [elasticsearch-01] path: /_cat/health, params: {pretty=, v=}
org.elasticsearch.discovery.MasterNotDiscoveredException: null
	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$4.onTimeout(TransportMasterNodeAction.java:259) [elasticsearch-7.1.0.jar:7.1.0]
	at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:322) [elasticsearch-7.1.0.jar:7.1.0]
	at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:249) [elasticsearch-7.1.0.jar:7.1.0]
	at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:555) [elasticsearch-7.1.0.jar:7.1.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:681) [elasticsearch-7.1.0.jar:7.1.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_11]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_11]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_11]

在这里插入图片描述

master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and [cluster.initial_master_nodes] is empty on this node: have discovered []; discovery will continue using [] from hosts providers and [{elasticsearch-01}{2eBgVAENQPasypfXsl6qkA}{GF02xNDYSAyslk2ZF5Decw}{192.168.138.130}{192.168.138.130:9300}{ml.machine_memory=1021906944, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

在这里插入图片描述

Answer

原因:elasticsearch没有发现master和集群初始化主节点的配置为空

解决办法:修改elasticsearch.yml,添加如下配置

# --------------------------------- Discovery ----------------------------------
cluster.initial_master_nodes: ["master"]
发布了131 篇原创文章 · 获赞 12 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/JavaDestiny/article/details/90704974