Как выяснить причину ошибки при поиске в Kibana: "Courier fetch: xxx of xxx shards failed"

Получаю ошибку при попытке поиска в Kibana:

Courier fetch: xxx of xxx shards failed.

Для начала проверил всё ли в порядке с шардами - всё действительно ок.

Посмотрел логи

[2021-11-28T23:49:07,110][DEBUG][o.e.a.s.TransportSearchAction] [P_4Rnxt] [applicationlog-trace-2021.11.28][0], node[2Ydlri8bSdSReKusMJz69A], [P], s[STARTED], a[id=YYIMA8OsS5WRtReaNbPizQ]: Failed to execute [SearchRequest{searchType=QUERY_THEN_FETCH, indices=[*], indicesOptions=IndicesOptions[id=39, ignore_unavailable=true, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=true, ignore_aliases=false], types=[], routing='null', preference='1638172013519', requestCache=null, scroll=null, maxConcurrentShardRequests=35, batchedReduceSize=512, preFilterShardSize=64, allowPartialSearchResults=true, source={"size":500,"query":{"bool":{"must":[{"match_phrase":{"transactionId":{"query":"30b0ec7d-3f2d-4694-8292-f9bd74cb9e43","slop":0,"zero_terms_query":"NONE","boost":1.0}}},{"range":{"@timestamp":{"from":1638085745628,"to":1638172145628,"include_lower":true,"include_upper":true,"format":"epoch_millis","boost":1.0}}}],"filter":[{"bool":{"should":[__PATH__
org.elasticsearch.transport.RemoteTransportException: [2Ydlri8][__IP__][__PATH__[__PATH__]]

Caused by: org.elasticsearch.index.query.QueryShardException: The _source field is not searchable
	at org.elasticsearch.index.mapper.SourceFieldMapper$SourceFieldType.existsQuery(SourceFieldMapper.java:170) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.ExistsQueryBuilder.newFieldExistsQuery(ExistsQueryBuilder.java:193) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.ExistsQueryBuilder.newFilter(ExistsQueryBuilder.java:157) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.ExistsQueryBuilder.doToQuery(ExistsQueryBuilder.java:130) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:98) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.BoolQueryBuilder.addBooleanClauses(BoolQueryBuilder.java:405) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.BoolQueryBuilder.doToQuery(BoolQueryBuilder.java:381) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:98) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.AbstractQueryBuilder.toFilter(AbstractQueryBuilder.java:120) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.BoolQueryBuilder.addBooleanClauses(BoolQueryBuilder.java:409) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.BoolQueryBuilder.doToQuery(BoolQueryBuilder.java:382) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:98) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.QueryShardContext.lambda$toQuery$2(QueryShardContext.java:304) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:316) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:303) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:724) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.search.SearchService.createContext(SearchService.java:575) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:551) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:347) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:333) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:329) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.search.SearchService$3.doRun(SearchService.java:1019) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:734) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) ~[elasticsearch-6.3.1.jar:6.3.1]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.3.1.jar:6.3.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_252]
	at java.lang.Thread.run(Thread.java:749) [?:1.8.0_252]

Проверил конфликты маппингов в индексах - были, устранил(переиндексировал) - но все равно не могу искать по "*" индексам.

В коде нашел эту строку и десятки ее вызовов - не совсем понял как соотносится поиск по "*" и данный метод:

https://github.com/elastic/elasticsearch/blob/v6.3.1/server/src/main/java/org/elasticsearch/index/mapper/SourceFieldMapper.java#L170

Подскажите куда "копать", чтобы исправить ошибку? Благодарю за Ваше время.

Похоже, что там где генерируется запрос exist по полю source. Надо смотреть на фильтр визуализации, динамические поля, и т.п.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.