Kibana突然无法连接Elasticsearch,报错 all shards failed

先说明:今天kibana突然无法连接Elasticsearch,之前是一直可以的
es版本7.6.1
怀疑是错打了书上的实验代码,做了些不知道什么鬼的操作
报错如下:


image.png

Unable to connect to Elasticsearch. Error: [search_phase_execution_exception] all shards failed
而且elasticsearch的运行也出来了一堆东西


image.png

真的是太奇怪了,百度了很多,无果
最后终于找到了解决办法,如下:
首先打开head
运行

curl -XDELETE http://localhost:9200/.kibana_task_manager_1

提交请求
然后运行

curl -X DELETE http://localhost:9200/.kibana*

提交请求


image.png

image.png

重新运行kibana


image.png
image.png

成功了!!!
感动啊!这个bug又耗费了我一早上,现在还要赶es的项目

方法来源如下:
https://discuss.elastic.co/t/kibana-task-manager-1-issues/222839

还有其它的一些方法,如果不行的朋友可以参考试试,我当时试的时候是不行的
1、http://elasticsearch-users.115913.n3.nabble.com/Oops-SearchPhaseExecutionException-Failed-to-execute-phase-query-all-shards-failed-td4068795.html

curl -XPUT 'localhost:9200/my_index/_settings' -d '
{
"index" : {
"number_of_replicas" : 0
    }
}'

2、https://blog.csdn.net/QiaoRui_/article/details/97267844

curl -XDELETE http://localhost:9200/.kibana_task_manager

你可能感兴趣的:(Kibana突然无法连接Elasticsearch,报错 all shards failed)