不要急,总有办法的

scroll查询报错node is not available

Elasticsearch | 作者 junqi | 发布于4 天前 | 阅读数:48




想通过scroll查询数据,数据量大概一千万,但是执行查询就报错:{"error":{"root_cause":[{"type":"illegal_state_exception","reason":"node [mKK2ugwOSKSuQuNLbwUjvQ] is not available"},{"type":"illegal_state_exception","reason":"node [kY9MUiTIS-SBXG8hGn4CjQ] is not available"},{"type":"illegal_state_exception","reason":"node [H6izRVuLQuaHp78P3DwiWQ] is not available"},{"type":"illegal_state_exception","reason":"node [Pf90HbqlQgaDGguxGctEEQ] is not available"},{"type":"illegal_state_exception","reason":"node [4jlQuGm7T0aoc6DObr09aA] is not available"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":-1,"index":null,"reason":{"type":"illegal_state_exception","reason":"node [mKK2ugwOSKSuQuNLbwUjvQ] is not available"}},{"shard":-1,"index":null,"reason":{"type":"illegal_state_exception","reason":"node [kY9MUiTIS-SBXG8hGn4CjQ] is not available"}},{"shard":-1,"index":null,"reason":{"type":"illegal_state_exception","reason":"node [H6izRVuLQuaHp78P3DwiWQ] is not available"}},{"shard":-1,"index":null,"reason":{"type":"illegal_state_exception","reason":"node [Pf90HbqlQgaDGguxGctEEQ] is not available"}},{"shard":-1,"index":null,"reason":{"type":"illegal_state_exception","reason":"node [4jlQuGm7T0aoc6DObr09aA] is not available"}}]},"status":500}

查询方式为rest请求:/index/_search?scroll=1m
{"size":10000,"query":{"bool":{"filter":[{"range":{"t_order_member|create_time":{"gte":"2019-10-30 17:40:11","lte":"2019-11-29 17:40:11"}}}]}},"_source":{"includes":["t_order_member|member_id"]}}
已邀请:

junqi

赞同来自:

版本:6.3.0,   这个查询语句  再测试和预生产环境 都是正常的 但是到线上就不行   不知道是不是线上的数据量太大了还是什么原因

tacsklet - 公司有用到es

赞同来自:

这个错误可能是生产环境的es保存的数据或者分片太多了,硬件配置不满足,分片损坏等等可能,不是查询语句的问题,去检查es服务器吧。

要回复问题请先登录注册