运行es是报错:All shards failed for phase
运行命令:查看所有的index的状态,发现都是yellow
curl -XGET ‘http://127.0.0.1:9200/_cat/indices?v&pretty’
处理方法:
curl -H "Content-Type: application/json" -XPUT 'http://localhost:9200/_all/_settings' -d '
{
"index" : {
"number_of_replicas" : 0
}
}'
然后接下来再看下所有的索引状态:
curl -XGET ‘http://127.0.0.1:9200/_cat/indices?v&pretty’