2016-10-03 3 views
0

2 개 탄성 찾기 클러스터를 실행 중이고 모든 색인이 2 개의 기본 샤드와 1 개의 복제본으로 구성되어 있습니다. 처음에는 모든 노드가 1 개의 1 차 샤드와 1 개의 복제본을 저장할 것이라고 생각했지만, 그것은 실현되지 않았습니다.탄성 검색이 조각이나 복제본을 적절히 할당하지 않음

curl -XGET http://localhost:9200/_cat/shards 
.kibana     0 p STARTED  1 3.1kb 10.151.6.98 Eleggua 
.kibana     0 r UNASSIGNED 
logstash-sflow-2016.10.03 1 p STARTED  738 644.4kb 10.151.6.98 Eleggua 
logstash-sflow-2016.10.03 1 r UNASSIGNED 
logstash-sflow-2016.10.03 0 p STARTED  783 618.4kb 10.151.6.98 Eleggua 
logstash-sflow-2016.10.03 0 r UNASSIGNED 
logstash-ipf-2016.10.03 1 p STARTED 8480 3.9mb 10.151.6.98 Eleggua 
logstash-ipf-2016.10.03 1 r UNASSIGNED 
logstash-ipf-2016.10.03 0 p STARTED 8656 6.3mb 10.151.6.98 Eleggua 
logstash-ipf-2016.10.03 0 r UNASSIGNED 
logstash-raw-2016.10.03 1 p STARTED  254 177.9kb 10.151.6.98 Eleggua 
logstash-raw-2016.10.03 1 r UNASSIGNED 
logstash-raw-2016.10.03 0 p STARTED  274 180kb 10.151.6.98 Eleggua 
logstash-raw-2016.10.03 0 r UNASSIGNED 
logstash-pf-2016.10.03 1 p STARTED 4340 2.9mb 10.151.6.98 Eleggua 
logstash-pf-2016.10.03 1 r UNASSIGNED 
logstash-pf-2016.10.03 0 p STARTED 4234 5.7mb 10.151.6.98 Eleggua 
logstash-pf-2016.10.03 0 r UNASSIGNED 

위와 같이 모든 샤드는 단일 노드에서 호스트되며 복제본은 할당되지 않습니다.

curl -XGET 'http://127.0.0.1:9200/_cluster/health?pretty=true' 
{ 
    "cluster_name" : "es_gts_seginfo", 
    "status" : "yellow", 
    "timed_out" : false, 
    "number_of_nodes" : 2, 
    "number_of_data_nodes" : 2, 
    "active_primary_shards" : 9, 
    "active_shards" : 9, 
    "relocating_shards" : 0, 
    "initializing_shards" : 0, 
    "unassigned_shards" : 9, 
    "delayed_unassigned_shards" : 0, 
    "number_of_pending_tasks" : 0, 
    "number_of_in_flight_fetch" : 0, 
    "task_max_waiting_in_queue_millis" : 0, 
    "active_shards_percent_as_number" : 50.0 
} 

내가 뭘 잘못하고 있니?

+1

클러스터 설정을 게시 할 수 있습니까? 탄력성 검색 로그에 뭐가 보이니? 의 출력은 무엇입니까? curl -XPOST : http : // localhost : 9200/_cluster/reroute? explain' –

+1

여기에 언급 된 단계를 시도해 보셨습니까 : http://stackoverflow.com/a/23816954/689625. 노드 당 파편 수에 한계가 있습니까? https://www.elastic.co/guide/en/elasticsearch/reference/current/allocation-total-shards.html – jay

+2

노드의 네트워크 구성을 표시 할 수 있습니까? 그들은 서로 "보았다", 즉 그들이 서로를 발견 했는가? – Val

답변

0

당신 덕분에 문제를 파악할 수있었습니다. 내 노드 중 하나가 2.4.0을 실행 중이며 다른 하나는 2.4.1을 실행 중입니다. 이렇게하면 재 라우팅이 제대로 작동하지 않습니다.

curl -XPOST -d '{ "commands" : [ { 
> "allocate" : { 
>  "index" : ".kibana", 
>  "shard" : 0, 
>  "node" : "proc-gts-elk01", 
>  "allow_primary":true 
>  } 
> } ] }' http://localhost:9200/_cluster/reroute?pretty 
{ 
    "error" : { 
    "root_cause" : [ { 
     "type" : "illegal_argument_exception", 
     "reason" : "[allocate] allocation of [.kibana][0] on node {proc-gts-elk01}{dhLrHPqTR0y9IkU_kFS5Cw}{10.151.6.19}{10.151.6.19:9300}{max_local_storage_nodes=1, hostname=proc-gts-elk01, data=yes, master=yes} is not allowed, reason: [YES(below shard recovery limit of [2])][YES(node passes include/exclude/require filters)][YES(primary is already active)][YES(enough disk for shard on node, free: [81.4gb])][YES(shard not primary or relocation disabled)][YES(shard is not allocated to same node or host)][YES(allocation disabling is ignored)][YES(total shard limit disabled: [index: -1, cluster: -1] <= 0)][YES(node meets awareness requirements)][YES(allocation disabling is ignored)][NO(target node version [2.4.0] is older than source node version [2.4.1])]" 
    } ], 
    "type" : "illegal_argument_exception", 
    "reason" : "[allocate] allocation of [.kibana][0] on node {proc-gts-elk01}{dhLrHPqTR0y9IkU_kFS5Cw}{10.151.6.19}{10.151.6.19:9300}{max_local_storage_nodes=1, hostname=proc-gts-elk01, data=yes, master=yes} is not allowed, reason: [YES(below shard recovery limit of [2])][YES(node passes include/exclude/require filters)][YES(primary is already active)][YES(enough disk for shard on node, free: [81.4gb])][YES(shard not primary or relocation disabled)][YES(shard is not allocated to same node or host)][YES(allocation disabling is ignored)][YES(total shard limit disabled: [index: -1, cluster: -1] <= 0)][YES(node meets awareness requirements)][YES(allocation disabling is ignored)][NO(target node version [2.4.0] is older than source node version [2.4.1])]" 
    }, 
    "status" : 400 
} 
관련 문제