2017-07-22 186 views
0

我想在單個主機上設置elasticsearch。下面是我的配置看起來像:master_not_discovered_exception ElasticSearch單節點

elasticsearch.yml

node.name: ${HOSTNAME} 

network.host: _site_, _local_ 
http.port: 9200 
transport.tcp.port: 9300 
cluster.name: "test_cluster" 
node.local: true 

kibana.yml

server.host: 0.0.0.0 
elasticsearch.url: http://localhost:9200 

在下面的命令:

curl -XGET 'localhost:9200/_cluster/health?pretty' 

我獲得以下MES鼠尾草:

{ 
    "error" : { 
    "root_cause" : [ 
    { 
     "type" : "master_not_discovered_exception", 
     "reason" : null 
    } 
    ], 
    "type" : "master_not_discovered_exception", 
    "reason" : null 
}, 
"status" : 503 
} 

在日誌文件中我看到以下消息:

not enough master nodes discovered during pinging (found [[]], but needed [-1]), pinging again 

可能有人請點這裏我正確的方向?

回答

0

首先,我不認爲你需要爲此設置network.host

在你的日誌它正在試圖獲得一個高手,但結果是0

你可以嘗試設置屬性,如:

node.master: true 
node.data:true 

還可以請你把更多的日誌在這裏,如果它不工作

+0

感謝您的回覆,Nikunj!還是行不通。這是我在日誌中看到的所有內容: [2017-07-23T13:00:25,440] [WARN] [oedzZenDiscovery] []在ping過程中發現的主節點不足[找到[[]],但需要[-1] ),ping再次 – test123

+0

任何機會,你可以把這裏任何其他條目你有im yml文件。因爲錯誤來自ZenDiscovery,爲什麼要爲單個節點啓用? –

+0

這就是我擁有的所有配置。 :( – test123

0

您可以在elasticsearch.yml試試這個:

discovery.zen.minimum_master_nodes: 1 

我認爲ES將始終找到discovery.zen.ping.unicast.hosts,直到它 發現nodescount等於minimum_master_nodes