Elasticsearch issues can be solved using the Elasticsearch troubleshooter tool. Click on each question to reveal the answer in each step of the troubleshooter.
On Magento Cloud please note that service upgrades cannot be pushed to the production environment without 48 business hours' notice to our infrastructure team. This is required as we need to ensure that we have an infrastructure support engineer available to update your configuration within a desired timeframe with minimal downtime to your production environment. So 48 hours prior to when your changes need to be on production submit a support ticket detailing your required service upgrade and stating the time when you want the upgrade process to start.
Step 1
a. YES – Proceed to Step 2.
b. NO – Search again on relevant search terms in the Magento Help Center Knowledge Base.
Step 2
a. YES – Ensure Elasticsearch is installed properly. Also check whether you are on Magento Commerce Cloud 2.3.1 or later. Merchants that have upgraded to Magento Commerce Cloud (versions 2.3.1 and onwards) and are on a version of Elasticsearch prior to 6.x can experience errors when deploying. To solve this issue the Elasticsearch client module and Elasticsearch service need to be on the latest recommended versions. For steps refer to Elasticsearch issues after Magento Commerce Cloud 2.3.1+ upgrade.
b. NO – Check the health of your cluster. If you are on a Pro staging or production environment run this command: curl -m1 localhost:9200/_cluster/health?pretty
. If you are on an integration environment (that includes all the Starter branches) runcurl -m1 elasticsearch.internal:9200/_cluster/health?pretty
. Proceed to Step 3.
Step 4
a. YES – Elasticsearch is available for processing data and reindexing should work. Proceed to Step 5.
b. NO – Yellow or red means there are problems with connections between nodes, and some data may not be available. If yellow run the command: php bin/magento config:show catalog/search/engine
to check your search engine. Proceed to Step 6. If red response submit a support ticket.
Step 5
a. YES – Run this command to check the status of catalog search:
php bin/magento indexer:status
. Proceed to Step 8.
b. NO – Run command: php bin/magento config:show catalog/search/engine
. Proceed to Step 6.
Step 6
a. YES – Check if ElasticSuite is at the current version by running this command:
cat composer.lock | grep -A 1 elasticsuite | grep '"version"'
To check if this version is depreciated or recommended, refer to Github: Smile-SA/elaticsuite. If ElasticSuite is up to date proceed to Step 10.
b. NO – proceed to Step 7.
Step 7
php ./vendor/bin/ece-tools -V
and check ECE-tools version. Is it the latest version of ECE-tools?a. YES – Proceed to Step 5a.
b. NO – Upgrade ECE-tools to the most current version. Run the command php bin/magento config: show catalog/search/engine
to check your search engine. Proceed to Step 6.
Step 8
a. YES – You need to wait until processing is done and then check if product categories updated. If they have not, submit a support ticket.
b. NO – If the status of catalog search is Reindex required run in CLI/Terminal:
php bin/magento cron:run
. If this does not work, run:
php bin/magento indexer:reindex
. If this does not solve the issue, submit a support ticket.
Step 9
.yaml
file recently updated?a. YES – Check .yaml
Elasticsearch configuration by referring to DevDocs Set up Elasticsearch: To enable Elasticsearch.
b. NO – Submit a support ticket.
Step 10
curl elasticsearch.internal:9200/_cat/indices
(if you are on an integration environment that includes all the Starter branches). If you are on Pro staging or production environment run curl
localhost:9200/_cat/indices
. Are there tracking indices listed? Check the output for <index
name>_tracking_log_
. a. YES – If you are on a version of ElasticSuite prior to version 2.8.0 it is recommended that you upgrade to ElasticSuite 2.8.0 to adjust tracking indices retention or disable tracking. If you cannot immediately upgrade you can create a cron to remove tracking indices. However, this could cause performance issues. Once you have upgraded to ElasticSuite 2.8.0 or removed tracking indices run the command (if you are on Pro staging or production environments): localhost:9200/_cat/allocation?v
to check available space. If you are on one of the integration environments (that includes all the Starter branches) run elasticsearch.internal:9200/_cat/allocation?v
. Proceed to Step 11.
b. NO – If you are on Pro staging or production environments run localhost:9200/_cat/allocation?v
and check available space. If you are on one of the integration environments (that includes all the Starter branches) run elasticsearch.internal:9200/_cat/allocation?v
. Proceed to Step 11.
Step 11
a. YES – Review the Magento Help Center Troubleshooting article Ensure Elasticsearch is installed properly or Elasticsearch crashes or has out of memory issues when using ElasticSuite plugin.
b. NO – Proceed to Step 12.
Step 12
a. YES – You need to increase available storage. Refer to DevDocs Set up Elasticsearch: To enable Elasticsearch. Then run: localhost:9200/_cat/allocation?v
(if you are on Pro staging or production environments). If you are on one of the integration environments (that includes all the Starter branches) run: elasticsearch.internal:9200/_cat/allocation?v
. Proceed to Step 11.
b. NO – Submit a support ticket.