2015-07-03 52 views
2

我對Elasticsearch很新,嘗試使用它來分析來自Suricata IPS的數據。頭插件顯示我:yellow (131 of 262) unassigned shards 也越來越此:Elasticsearch集羣運行狀況:黃色(131 of 262)未分配的分片

$ curl -XGET http://127.0.0.1:9200/_cluster/health?pretty 
{ 
    "cluster_name" : "elasticsearch_brew", 
    "status" : "yellow", 
    "timed_out" : false, 
    "number_of_nodes" : 1, 
    "number_of_data_nodes" : 1, 
    "active_primary_shards" : 131, 
    "active_shards" : 131, 
    "relocating_shards" : 0, 
    "initializing_shards" : 0, 
    "unassigned_shards" : 131, 
    "number_of_pending_tasks" : 0, 
    "number_of_in_flight_fetch" : 0 
} 

如何擺脫那些未分配的碎片?而且還Kibana說我這個不時:

Error: Bad Gateway 
    at respond (https://www.server.kibana/index.js?_b=:85279:15) 
    at checkRespForFailure (https://www.server.kibana/index.js?_b=:85247:7) 
    at https://www.server.kibana/index.js?_b=:83885:7 
    at wrappedErrback (https://www.server.kibana/index.js?_b=:20902:78) 
    at wrappedErrback (https://www.server.kibana/index.js?_b=:20902:78) 
    at wrappedErrback (https://www.server.kibana/index.js?_b=:20902:78) 
    at https://www.server.kibana/index.js?_b=:21035:76 
    at Scope.$eval (https://www.server.kibana/index.js?_b=:22022:28) 
    at Scope.$digest (https://www.server.kibana/index.js?_b=:21834:31) 
    at Scope.$apply (https://www.server.kibana/index.js?_b=:22126:24) 

我不知道,如果這些問題相互連接...可能請人幫我得到它的工作。非常感謝你!

回答

9

只有一個節點和索引有一個副本的集羣將總是yellow

yellow不是一件壞事,集羣工作得很好。缺點是它沒有激活分片的副本。

如果您將副本數設置爲0或將第二個節點添加到羣集,則可以有​​羣集。

但是,正如我所說,如果您有一個yellow羣集沒有問題。副本

設置數量爲0,集羣寬(所有索引):

curl -XPUT "http://localhost:9200/_settings" -d' 
{ 
    "number_of_replicas" : 0 
}' 
+0

https://github.com/GoogleCloudPlatform/kubernetes/issues/9885 –

+0

謝謝您的答覆。我怎麼讓我們說複製品的數量設置爲0? – Drew

+0

我認爲我的問題其實更深入。我的羣集有問題...這是我的其他問題的鏈接:http://stackoverflow.com/questions/31213429/kibana-4-with-apache-reverse-proxy-error-bad-gateway請幫助如果你可以的話。謝謝! – Drew