cluster_block_exception [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block]
Após digitar o seguinte comando no terminal:
bin/magento indexer:reindex
O seguinte erro pode aparecer:
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Category Flat Data index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:00
Stock index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
Google Product Removal Feed index has been rebuilt successfully in 00:00:00
Google Product Feed index has been rebuilt successfully in 00:00:00
Catalog Search index process unknown error:
{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"index [magento2_product_1_v1516] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"}],"type":"cluster_block_exception","reason":"index [magento2_product_1_v1516] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"},"status":429}
Este erro significa que não existe espaço em disco suficiente para armazenar ou atualizar dados. Sempre que não existe espaço em disco suficiente, o erro acima é exibido e coloca o Elasticsearch em modo de leitura. Ou seja, é necessário liberar espaço em disco ou efetuar um upgrade.
Etapas para resolver o problema de reindexação no Elasticsearch
1) Liberar espaço em disco ou efetuar um upgrade é o primeiro passo;
2) Digitar estes dois comandos no terminal:
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
3) Digitar novamente o comando reindex (na pasta correspondente onde o Magento 2 está instalado, ex. public_html).
bin/magento indexer:reindex
No final, a dificuldade deverá ter sido ultrapassada. Se tiver alguma dúvida, entre em contato connosco.